| 410 | ////////////////////////////////////////////////////////////////////////// |
| 411 | |
| 412 | SimObject *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 | |
| 434 | SimObject *SimSet::findObject(const char *namePath) |
| 435 | { |
no test coverage detected