MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / resetNode

Method resetNode

Engine/source/persistence/taml/tamlWriteNode.cpp:30–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28//-----------------------------------------------------------------------------
29
30void TamlWriteNode::resetNode( void )
31{
32 // Debug Profiling.
33 PROFILE_SCOPE(TamlWriteNode_ResetNode);
34
35 // Clear fields.
36 for( Vector<TamlWriteNode::FieldValuePair*>::iterator itr = mFields.begin(); itr != mFields.end(); ++itr )
37 {
38 delete[] (*itr)->mpValue;
39 }
40 mFields.clear();
41
42 // Clear children.
43 if ( mChildren != NULL )
44 {
45 for( Vector<TamlWriteNode*>::iterator itr = mChildren->begin(); itr != mChildren->end(); ++itr )
46 {
47 (*itr)->resetNode();
48 }
49
50 mChildren->clear();
51 delete mChildren;
52 mChildren = NULL;
53 }
54
55 mRefId = 0;
56 mRefToNode = NULL;
57 mChildren = NULL;
58 mpObjectName = NULL;
59 mpSimObject = NULL;
60
61 // Reset callbacks.
62 mpTamlCallbacks = NULL;
63
64 // Reset custom nodes.
65 mCustomNodes.resetState();
66}

Callers 1

resetCompilationMethod · 0.80

Calls 4

beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45
resetStateMethod · 0.45

Tested by

no test coverage detected