MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / LinkEndChild

Method LinkEndChild

ogsr_engine/xrCore/XML_Parser/tinyxml.cpp:162–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162TiXmlNode* TiXmlNode::LinkEndChild(TiXmlNode* node)
163{
164 assert(node->parent == 0 || node->parent == this);
165 assert(node->GetDocument() == 0 || node->GetDocument() == this->GetDocument());
166
167 if (node->Type() == TiXmlNode::DOCUMENT)
168 {
169 xr_delete(node);
170 if (GetDocument())
171 GetDocument()->SetError(TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN);
172 return 0;
173 }
174
175 node->parent = this;
176
177 node->prev = lastChild;
178 node->next = 0;
179
180 if (lastChild)
181 lastChild->next = node;
182 else
183 firstChild = node; // it was an empty list.
184
185 lastChild = node;
186 return node;
187}
188
189TiXmlNode* TiXmlNode::InsertEndChild(const TiXmlNode& addThis)
190{

Callers 1

CopyToMethod · 0.80

Calls 4

GetDocumentMethod · 0.95
xr_deleteFunction · 0.85
SetErrorMethod · 0.80
TypeMethod · 0.45

Tested by

no test coverage detected