| 32 | } |
| 33 | |
| 34 | IRoot* GetIRootAttribute( IRoot* object, const std::string& name ) |
| 35 | { |
| 36 | auto entry = FindEntry( object, name.c_str() ); |
| 37 | if( !entry.second ) |
| 38 | { |
| 39 | return nullptr; |
| 40 | } |
| 41 | if( entry.first->mSize && ( entry.first->mType == Be::IROOT || entry.first->mType == Be::IROOTPTR ) ) |
| 42 | { |
| 43 | if( entry.first->mType == Be::IROOTPTR ) |
| 44 | { |
| 45 | return entry.second->mIRootPtr; |
| 46 | } |
| 47 | else |
| 48 | { |
| 49 | return reinterpret_cast<IRoot*>( entry.second ); |
| 50 | } |
| 51 | } |
| 52 | return nullptr; |
| 53 | } |
| 54 | |
| 55 | bool GetStringAttribute( IRoot* object, const std::string& name, std::string& value ) |
| 56 | { |
no test coverage detected