MCPcopy Create free account
hub / github.com/carbonengine/trinity / FindVariable

Method FindVariable

trinity/Tr2VariableStore.cpp:293–307  ·  view source on GitHub ↗

------------------------------------------------------------- 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. -------------------------------------------------------------

Source from the content-addressed store, hash-verified

291// Variable with the given name or NULL if it was not found.
292// -------------------------------------------------------------
293TriVariable* 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:

Callers 7

PyFindVariableFunction · 0.80
GetSunDirWorldHandleFunction · 0.80
GetSunDiffuseColorHandleFunction · 0.80
GetAmbientColorHandleFunction · 0.80
MapPassResourcesMethod · 0.80
MapPassParametersMethod · 0.80

Calls 2

FindLocalVariableMethod · 0.80

Tested by

no test coverage detected