MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / findObject

Method findObject

engine/source/sim/simSet.cc:412–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410//////////////////////////////////////////////////////////////////////////
411
412SimObject *SimGroup::findObject(const char *namePath)
413{
414 // find the end of the object name
415 S32 len;
416 for(len = 0; namePath[len] != 0 && namePath[len] != '/'; len++)
417 ;
418
419 StringTableEntry stName = StringTable->lookupn(namePath, len);
420 if(!stName)
421 return NULL;
422
423 SimObject *root = nameDictionary.find(stName);
424
425 if(!root)
426 return NULL;
427
428 if(namePath[len] == 0)
429 return root;
430
431 return root->findObject(namePath + len + 1);
432}
433
434SimObject *SimSet::findObject(const char *namePath)
435{

Callers 2

execMethod · 0.45
findObjectFunction · 0.45

Calls 3

lookupnMethod · 0.80
findMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected