| 10 | namespace |
| 11 | { |
| 12 | std::pair<const Be::VarEntry*, Be::Var*> FindEntry( IRoot* object, const char* name ) |
| 13 | { |
| 14 | if( !object ) |
| 15 | { |
| 16 | return std::make_pair( nullptr, nullptr ); |
| 17 | } |
| 18 | auto type = object->ClassType(); |
| 19 | ssize_t offs = 0; |
| 20 | // Loop over all entries - this double loop covers chaining |
| 21 | for( ; type; offs += type->mOffsetToParent, type = type->mParentClassInfo ) |
| 22 | { |
| 23 | for( const Be::VarEntry* entry = type->mMemberTable; entry->mName; entry++ ) |
| 24 | { |
| 25 | if( !entry->mGetProperty && strcmp( entry->mName, name ) == 0 ) |
| 26 | { |
| 27 | return std::make_pair( entry, BLUEMAPMEMBEROFFSET( object, entry, type, offs ) ); |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 | return std::make_pair( nullptr, nullptr ); |
| 32 | } |
| 33 | |
| 34 | IRoot* GetIRootAttribute( IRoot* object, const std::string& name ) |
| 35 | { |
no outgoing calls
no test coverage detected