示例#1
0
文件: JDFJMF.cs 项目: cip4/JDFLibNet
        ///
        ///	 <summary> * convert all responses that match the query q to signals
        ///	 *  </summary>
        ///	 * <returns> the newly created JMF with multiple responses </returns>
        ///
        public virtual void convertResponses(JDFQuery q)
        {
            EnumType t   = q == null ? null : q.getEnumType();
            VElement v   = getMessageVector(EnumFamily.Response, t);
            string   qID = q == null ? null : q.getID();

            for (int i = 0; i < v.Count; i++)
            {
                JDFResponse r = (JDFResponse)v[i];
                if (qID == null || qID.Equals(r.getrefID()))
                {
                    JDFSignal s = appendSignal();
                    moveElement(s, r); // retain ordering
                    s.convertResponse(r, q);
                    r.deleteNode();
                }
            }
        }