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

Function FindEntry

trinity/Tr2DynamicBinding.cpp:12–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace
11{
12std::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
34IRoot* GetIRootAttribute( IRoot* object, const std::string& name )
35{

Callers 4

TriValueBinding.hFile · 0.70
InitializeMethod · 0.70
GetIRootAttributeFunction · 0.70
GetStringAttributeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected