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

Method getObject

Engine/modules/Verve/Core/VObject.cpp:68–86  ·  view source on GitHub ↗

----------------------------------------------------------------------------- VObject::getObject( pLabel ); Returns the object with the given label. If no object belongs to this object with that label, then a NULL value is returned. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

66//
67//-----------------------------------------------------------------------------
68VObject *VObject::getObject( const String &pLabel )
69{
70 VObject *node = ( VObject* )mChildNode;
71 while ( node )
72 {
73 // Compare Names.
74 if ( node->getLabel().equal( pLabel, String::NoCase ) )
75 {
76 // Valid.
77 return node;
78 }
79
80 // Next Sibling.
81 node = ( VObject* )node->mSiblingNextNode;
82 }
83
84 // Invalid.
85 return NULL;
86}
87
88//-----------------------------------------------------------------------------
89//

Callers 2

onTriggerMethod · 0.45
onTriggerMethod · 0.45

Calls 2

getLabelMethod · 0.80
equalMethod · 0.45

Tested by

no test coverage detected