------------------------------------------------------------- Description: Searches for a variable the given name in this store and its parents. Arguments: name - Name of the variable to unregister. Return Value: Variable with the given name or NULL if it was not found. -------------------------------------------------------------
| 291 | // Variable with the given name or NULL if it was not found. |
| 292 | // ------------------------------------------------------------- |
| 293 | TriVariable* Tr2VariableStore::FindVariable( const char* name ) const |
| 294 | { |
| 295 | CCP_STATS_ZONE( __FUNCTION__ ); |
| 296 | |
| 297 | const Tr2VariableStore* store = this; |
| 298 | while( store ) |
| 299 | { |
| 300 | if( TriVariable* variable = store->FindLocalVariable( name ) ) |
| 301 | { |
| 302 | return variable; |
| 303 | } |
| 304 | store = store->GetParentVariableStore(); |
| 305 | } |
| 306 | return NULL; |
| 307 | } |
| 308 | |
| 309 | // ------------------------------------------------------------- |
| 310 | // Description: |
no test coverage detected