----------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------
| 67 | // |
| 68 | //----------------------------------------------------------------------------- |
| 69 | VObject *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 | // |