Logo Search packages:      
Sourcecode: rarian version File versions

TiXmlNode * TiXmlNode::LinkEndChild ( TiXmlNode addThis  )  [inherited]

Add a new node related to this. Adds a child past the LastChild.

NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions.

See also:

Definition at line 194 of file tinyxml.cpp.

References TiXmlNode::GetDocument(), TiXmlNode::next, TiXmlNode::parent, and TiXmlNode::prev.

Referenced by TiXmlNode::InsertEndChild(), and TiXmlDocument::Parse().

      assert( node->parent == 0 || node->parent == this );
      assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() );

      node->parent = this;

      node->prev = lastChild;
      node->next = 0;

      if ( lastChild )
            lastChild->next = node;
            firstChild = node;                  // it was an empty list.

      lastChild = node;
      return node;

Generated by  Doxygen 1.6.0   Back to index