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

Method getObject

Engine/source/Verve/Core/VObject.cpp:69–87  ·  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

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

Callers 2

onTriggerMethod · 0.45
onTriggerMethod · 0.45

Calls 2

getLabelMethod · 0.80
equalMethod · 0.45

Tested by

no test coverage detected