MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / getVariable

Method getVariable

OgreMain/src/OgreScriptCompiler.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 std::pair<bool, String> ObjectAbstractNode::getVariable( const String &inName ) const
109 {
110 map<String, String>::type::const_iterator i = mEnv.find( inName );
111 if( i != mEnv.end() )
112 return std::make_pair( true, i->second );
113
114 ObjectAbstractNode *parentNode = (ObjectAbstractNode *)this->parent;
115 while( parentNode )
116 {
117 i = parentNode->mEnv.find( inName );
118 if( i != parentNode->mEnv.end() )
119 return std::make_pair( true, i->second );
120 parentNode = (ObjectAbstractNode *)parentNode->parent;
121 }
122 return std::make_pair( false, "" );
123 }
124
125 const map<String, String>::type &ObjectAbstractNode::getVariables() const { return mEnv; }
126

Callers 2

overlayObjectMethod · 0.80
processVariablesMethod · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected