示例#1
0
        /// <summary> Creates a new, empty repetition of the underlying Group and sets up
        /// Pointers to it's components.
        /// </summary>
        /// <thows>  HL7Exception if there is already 1 rep and group is non-repeating </thows>
        private void  createNewInstance()
        {
            //find next rep # ...
            int nextRepNum = parent.getAll(this.name).Length;

            this.currentGroup        = (Group)parent.get_Renamed(this.name, nextRepNum);
            this.childAtWhichToStart = 0;

            //set up pointers for children ...
            System.String[] childNames = currentGroup.Names;
            this.children = new NuGenPointer[childNames.Length];
            for (int i = 0; i < childNames.Length; i++)
            {
                NuGenPointer p;
                //make new SegmentPointer or GroupPointer depending on whether child is a Group ...
                System.Type childClass = currentGroup.getClass(childNames[i]);
                if (typeof(Group).IsAssignableFrom(childClass))
                {
                    p = new NuGenGroupPointer(this.parser, currentGroup, i, this.encodingChars);
                }
                else
                {
                    p = new NuGenSegmentPointer(this.parser, currentGroup, i, encodingChars);
                }

                this.children[i] = p;
            }
        }
        /// <summary> Creates a new, empty repetition of the underlying Group and sets up
        /// Pointers to it's components.
        /// </summary>
        /// <thows>  HL7Exception if there is already 1 rep and group is non-repeating </thows>
        private void  makeChildren()
        {
            //set up pointers for children ...
            System.String[] childNames = message.Names;
            this.children = new NuGenPointer[childNames.Length];
            for (int i = 0; i < childNames.Length; i++)
            {
                NuGenPointer p;
                //make new SegmentPointer or GroupPointer depending on whether child is a Group ...
                System.Type childClass = message.getClass(childNames[i]);
                if (typeof(Group).IsAssignableFrom(childClass))
                {
                    p = new NuGenGroupPointer(this.parser, message, i, this.encodingChars);
                }
                else
                {
                    p = new NuGenSegmentPointer(this.parser, message, i, encodingChars);
                }

                this.children[i] = p;
            }
        }
		/// <summary> Creates a new, empty repetition of the underlying Group and sets up 
		/// Pointers to it's components.  
		/// </summary>
		/// <thows>  HL7Exception if there is already 1 rep and group is non-repeating </thows>
		private void  makeChildren()
		{
			
			//set up pointers for children ... 
			System.String[] childNames = message.Names;
			this.children = new NuGenPointer[childNames.Length];
			for (int i = 0; i < childNames.Length; i++)
			{
				NuGenPointer p;
				//make new SegmentPointer or GroupPointer depending on whether child is a Group ... 
				System.Type childClass = message.getClass(childNames[i]);
				if (typeof(Group).IsAssignableFrom(childClass))
				{
					p = new NuGenGroupPointer(this.parser, message, i, this.encodingChars);
				}
				else
				{
					p = new NuGenSegmentPointer(this.parser, message, i, encodingChars);
				}
				
				this.children[i] = p;
			}
		}
		/// <summary> Creates a new, empty repetition of the underlying Group and sets up 
		/// Pointers to it's components.  
		/// </summary>
		/// <thows>  HL7Exception if there is already 1 rep and group is non-repeating </thows>
		private void  createNewInstance()
		{
			//find next rep # ... 
			int nextRepNum = parent.getAll(this.name).Length;
			
			this.currentGroup = (Group) parent.get_Renamed(this.name, nextRepNum);
			this.childAtWhichToStart = 0;
			
			//set up pointers for children ... 
			System.String[] childNames = currentGroup.Names;
			this.children = new NuGenPointer[childNames.Length];
			for (int i = 0; i < childNames.Length; i++)
			{
				NuGenPointer p;
				//make new SegmentPointer or GroupPointer depending on whether child is a Group ... 
				System.Type childClass = currentGroup.getClass(childNames[i]);
				if (typeof(Group).IsAssignableFrom(childClass))
				{
					p = new NuGenGroupPointer(this.parser, currentGroup, i, this.encodingChars);
				}
				else
				{
					p = new NuGenSegmentPointer(this.parser, currentGroup, i, encodingChars);
				}
				
				this.children[i] = p;
			}
		}