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