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

Function GetAttributeName

trinity/PostProcess/Tr2PostProcessAttributes.cpp:63–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62template <typename T>
63const char* GetAttributeName( T Tr2PostProcessAttributes::* attribute )
64{
65 auto a = reinterpret_cast<uintptr_t>( &reinterpret_cast<uint8_t&>( reinterpret_cast<Tr2PostProcessAttributes*>( 0 )->*attribute ) );
66 auto rtti = Tr2PostProcessAttributes::ClassType_();
67 for( const Be::VarEntry* entry = rtti->mMemberTable; entry->mName; entry++ )
68 {
69 if( !entry->mGetProperty && entry->mOffset == a )
70 {
71 return entry->mName;
72 }
73 }
74 return "unknown";
75}
76
77
78template <typename T, typename Accumulator = typename DefaultAccumulator<T>::Type>

Callers 1

AccumulateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected