MCPcopy Create free account
hub / github.com/crossuo/crossuo / Clear

Method Clear

external/tinyxml2.cpp:2164–2195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2162}
2163
2164void XMLDocument::Clear()
2165{
2166 DeleteChildren();
2167 while( _unlinked.Size()) {
2168 DeleteNode(_unlinked[0]); // Will remove from _unlinked as part of delete.
2169 }
2170
2171#ifdef TINYXML2_DEBUG
2172 const bool hadError = Error();
2173#endif
2174 ClearError();
2175
2176 delete [] _charBuffer;
2177 _charBuffer = 0;
2178 _parsingDepth = 0;
2179
2180#if 0
2181 _textPool.Trace( "text" );
2182 _elementPool.Trace( "element" );
2183 _commentPool.Trace( "comment" );
2184 _attributePool.Trace( "attribute" );
2185#endif
2186
2187#ifdef TINYXML2_DEBUG
2188 if ( !hadError ) {
2189 TIXMLASSERT( _elementPool.CurrentAllocs() == _elementPool.Untracked() );
2190 TIXMLASSERT( _attributePool.CurrentAllocs() == _attributePool.Untracked() );
2191 TIXMLASSERT( _textPool.CurrentAllocs() == _textPool.Untracked() );
2192 TIXMLASSERT( _commentPool.CurrentAllocs() == _commentPool.Untracked() );
2193 }
2194#endif
2195}
2196
2197
2198void XMLDocument::DeepCopy(XMLDocument* target) const

Callers 2

DeepCopyMethod · 0.45
ParseMethod · 0.45

Calls 6

ErrorFunction · 0.85
ClearErrorFunction · 0.85
TraceMethod · 0.80
CurrentAllocsMethod · 0.80
UntrackedMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected