MCPcopy Create free account
hub / github.com/WheretIB/nullc / MemberByName

Function MemberByName

NULLC/includes/typeinfo.cpp:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 return ret;
94 }
95 NULLCRef MemberByName(NULLCRef obj, NULLCArray member)
96 {
97 assert(linker);
98 ExternTypeInfo &exType = linker->exTypes[obj.typeID];
99 if(exType.subCat != ExternTypeInfo::CAT_CLASS)
100 return NULLCRef();
101 const char *str = &linker->exSymbols[exType.offsetToName];
102 const char *memberName = str + strlen(str) + 1;
103 for(unsigned i = 0; i < exType.memberCount; i++)
104 {
105 if(strcmp(memberName, member.ptr) == 0)
106 return MemberByIndex(obj, i);
107 memberName += strlen(memberName) + 1;
108 }
109 return NULLCRef();
110 }
111
112 int IsFunction(int id)
113 {

Callers

nothing calls this directly

Calls 4

assertFunction · 0.85
strcmpFunction · 0.85
MemberByIndexFunction · 0.85
NULLCRefClass · 0.50

Tested by

no test coverage detected