| 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 |
no test coverage detected