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

Function GetIRootAttribute

trinity/Tr2DynamicBinding.cpp:34–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34IRoot* 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
55bool GetStringAttribute( IRoot* object, const std::string& name, std::string& value )
56{

Callers 1

ResolveReferenceFunction · 0.70

Calls 1

FindEntryFunction · 0.70

Tested by

no test coverage detected