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

Method remove

Engine/source/Verve/Core/VTreeNode.cpp:375–405  ·  view source on GitHub ↗

----------------------------------------------------------------------------- VTreeNode::remove(); Detach this node from the current parent node. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

373//
374//-----------------------------------------------------------------------------
375void VTreeNode::remove( void )
376{
377 if ( !inTree() )
378 {
379 return;
380 }
381
382 // Callback.
383 onDetach();
384
385 if ( mParentNode && mParentNode->mChildNode == this )
386 {
387 // Update Parent Reference.
388 mParentNode->mChildNode = mSiblingNextNode;
389 }
390
391 if ( mSiblingNextNode )
392 {
393 // Update Previous Node.
394 mSiblingNextNode->mSiblingPrevNode = mSiblingPrevNode;
395 }
396
397 if ( mSiblingPrevNode )
398 {
399 // Update Next Node.
400 mSiblingPrevNode->mSiblingNextNode = mSiblingNextNode;
401 }
402
403 // Remove References.
404 mParentNode = mSiblingPrevNode = mSiblingNextNode = NULL;
405}
406
407//-----------------------------------------------------------------------------
408//

Callers 7

clearObjectMethod · 0.45
onDetachMethod · 0.45
onDetachMethod · 0.45
onDetachMethod · 0.45
VController.cppFile · 0.45
clearMethod · 0.45
VObject.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected