MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / InsertFirstChild

Method InsertFirstChild

3rdparty/tinyxml2/tinyxml2.cpp:955–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953
954
955XMLNode* XMLNode::InsertFirstChild( XMLNode* addThis )
956{
957 TIXMLASSERT( addThis );
958 if ( addThis->_document != _document ) {
959 TIXMLASSERT( false );
960 return 0;
961 }
962 InsertChildPreamble( addThis );
963
964 if ( _firstChild ) {
965 TIXMLASSERT( _lastChild );
966 TIXMLASSERT( _firstChild->_prev == 0 );
967
968 _firstChild->_prev = addThis;
969 addThis->_next = _firstChild;
970 _firstChild = addThis;
971
972 addThis->_prev = 0;
973 }
974 else {
975 TIXMLASSERT( _lastChild == 0 );
976 _firstChild = _lastChild = addThis;
977
978 addThis->_prev = 0;
979 addThis->_next = 0;
980 }
981 addThis->_parent = this;
982 return addThis;
983}
984
985
986XMLNode* XMLNode::InsertAfterChild( XMLNode* afterThis, XMLNode* addThis )

Callers 3

writeTreeNodesModelXMLFunction · 0.80
writeTreeXSDFunction · 0.80
WriteTreeToXMLFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected