/// <summary>
        /// VisitEnter method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
        /// <returns>
        /// true: traverse the children of this instance.
        /// false: do not traverse the children of this instance.
        /// </returns>
        public override bool VisitEnterSequenceItem(SequenceItem SequenceItem)
        {
            stringBuilder.Append(this.prefix + "Sequence Item\n");
            stringBuilder.Append(this.prefix + "  Attributes and Macros\n");

            this.prefix += "    ";

            return(true);
        }
Example #2
0
        /// <summary>
        /// Create a Sequence Attribute instance using a raw xml file (that is generated by the ODD).
        /// </summary>
        /// <param name="tag">The tag.</param>
        /// <param name="name">The name.</param>
        /// <param name="attributeNode">The Attribute node.</param>
        /// <param name="parent">The parent of the instance to create.</param>
        /// <returns>The created SequenceAttribute inistance.</returns>
        internal static SequenceAttribute Create(Tag tag, string name, XPathNavigator attributeNode, AttributesAndMacros parent)
        {
            SequenceAttribute sequenceAttribute = new SequenceAttribute(tag, name, parent);

            XPathNodeIterator itemNodes = attributeNode.Select("Values/Sequence/Item");

            if (itemNodes.MoveNext())
            {
                sequenceAttribute.sequenceItem = SequenceItem.Create(itemNodes.Current, sequenceAttribute);
            }
            else
            {
                throw (DefinitionFile.CreateException(attributeNode, "SequenceAttribute", "Values/Sequence/Item node not found", null));
            }

            return(sequenceAttribute);
        }
Example #3
0
        /// <summary>
        /// Create a Sequence Item instance using a raw xml file (that is generated by the ODD).
        /// </summary>
        /// <param name="sequenceItemNode">The Seuqnece Item node.</param>
        /// <param name="parent">The parent the the instance to create.</param>
        /// <returns>The created SequenceItem instance.</returns>
        public static SequenceItem Create(XPathNavigator sequenceItemNode, SequenceAttribute parent)
        {
            //
            // Construct SequenceItem instance.
            //

            SequenceItem sequenceItem = new SequenceItem(parent);

            //
            // Add attribute instances and Macros instances to created SequenceItem instance.
            //

            sequenceItem.AddAttributesAndMacros(sequenceItemNode);

            //
            // Return created instance.
            //

            return (sequenceItem);
        }
Example #4
0
        /// <summary>
        /// Create a Sequence Item instance using a raw xml file (that is generated by the ODD).
        /// </summary>
        /// <param name="sequenceItemNode">The Seuqnece Item node.</param>
        /// <param name="parent">The parent the the instance to create.</param>
        /// <returns>The created SequenceItem instance.</returns>
        public static SequenceItem Create(XPathNavigator sequenceItemNode, SequenceAttribute parent)
        {
            //
            // Construct SequenceItem instance.
            //

            SequenceItem sequenceItem = new SequenceItem(parent);


            //
            // Add attribute instances and Macros instances to created SequenceItem instance.
            //

            sequenceItem.AddAttributesAndMacros(sequenceItemNode);


            //
            // Return created instance.
            //

            return(sequenceItem);
        }
        /// <summary>
        /// VisitLeave method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
        /// <returns>
        /// true: continue traversing the siblings of the supplied instance.
        /// false: stop traversing the siblings of the supplied instance.
        /// </returns>
        public override bool VisitLeaveSequenceItem(SequenceItem SequenceItem)
        {
            this.prefix = this.prefix.Substring(0, this.prefix.Length - 4);

            return(true);
        }
Example #6
0
 /// <summary>
 /// VisitEnter method in the context of the "Hierarchical Visitor Pattern".
 /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
 /// </summary>
 /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
 /// <returns>
 /// true: traverse the children of this instance.
 /// false: do not traverse the children of this instance.
 /// </returns>
 public virtual bool VisitEnterSequenceItem(SequenceItem SequenceItem)
 {
     return (true);
 }
Example #7
0
 /// <summary>
 /// VisitLeave method in the context of the "Hierarchical Visitor Pattern".
 /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
 /// </summary>
 /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
 /// <returns>
 /// true: continue traversing the siblings of the supplied instance.
 /// false: stop traversing the siblings of the supplied instance.
 /// </returns>
 public virtual bool VisitLeaveSequenceItem(SequenceItem SequenceItem)
 {
     return (true);
 }
Example #8
0
 /// <summary>
 /// VisitEnter method in the context of the "Hierarchical Visitor Pattern".
 /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
 /// </summary>
 /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
 /// <returns>
 /// true: traverse the children of this instance.
 /// false: do not traverse the children of this instance.
 /// </returns>
 public virtual bool VisitEnterSequenceItem(SequenceItem SequenceItem)
 {
     return(true);
 }
Example #9
0
 /// <summary>
 /// VisitLeave method in the context of the "Hierarchical Visitor Pattern".
 /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
 /// </summary>
 /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
 /// <returns>
 /// true: continue traversing the siblings of the supplied instance.
 /// false: stop traversing the siblings of the supplied instance.
 /// </returns>
 public virtual bool VisitLeaveSequenceItem(SequenceItem SequenceItem)
 {
     return(true);
 }
Example #10
0
 // -----------------------------
 // - Begin constructors region -
 // -----------------------------
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="tag">The tag of this instance.</param>
 /// <param name="name">The name of this instance.</param>
 /// <param name="parent">The parent of this instance.</param>
 public SequenceAttribute(Tag tag, string name, AttributesAndMacros parent)
     : base(tag, VR.SQ, name, parent)
 {
     this.sequenceItem = new SequenceItem(this);
 }
Example #11
0
        // ---------------------
        // - End fields region -
        // ---------------------
        #endregion



        #region - Constructors -
        // -----------------------------
        // - Begin constructors region -
        // -----------------------------

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="tag">The tag of this instance.</param>
        /// <param name="name">The name of this instance.</param>
        /// <param name="parent">The parent of this instance.</param>
        public SequenceAttribute(Tag tag, string name, AttributesAndMacros parent)
            : base(tag, VR.SQ, name, parent)
        {
            this.sequenceItem = new SequenceItem(this);
        }
        /// <summary>
        /// VisitLeave method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
        /// <returns>
        /// true: continue traversing the siblings of the supplied instance.
        /// false: stop traversing the siblings of the supplied instance.
        /// </returns>
        public override bool VisitLeaveSequenceItem(SequenceItem SequenceItem)
        {
            this.prefix = this.prefix.Substring(0, this.prefix.Length - 4);

            return (true);
        }
        /// <summary>
        /// VisitEnter method in the context of the "Hierarchical Visitor Pattern".
        /// See "DVTk_Library\Documentation\Design\Hierarchical Visitor Pattern.htm".
        /// </summary>
        /// <param name="SequenceItem">The SequenceItem instance to visit.</param>
        /// <returns>
        /// true: traverse the children of this instance.
        /// false: do not traverse the children of this instance.
        /// </returns>
        public override bool VisitEnterSequenceItem(SequenceItem SequenceItem)
        {
            stringBuilder.Append(this.prefix + "Sequence Item\n");
            stringBuilder.Append(this.prefix + "  Attributes and Macros\n");

            this.prefix += "    ";

            return (true);
        }