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

Function MemberType

NULLC/includes/typeinfo.cpp:22–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 return exType.memberCount;
21 }
22 TypeID MemberType(int member, int* type)
23 {
24 assert(linker);
25 ExternTypeInfo &exType = linker->exTypes[*type];
26 if(exType.subCat != ExternTypeInfo::CAT_CLASS)
27 {
28 nullcThrowError("typeid::memberType: type (%s) is not a class", &linker->exSymbols[exType.offsetToName]);
29 return getTypeID(0);
30 }
31 if((unsigned int)member >= exType.memberCount)
32 {
33 nullcThrowError("typeid::memberType: member number illegal, type (%s) has only %d members", &linker->exSymbols[exType.offsetToName], exType.memberCount);
34 return getTypeID(0);
35 }
36 unsigned int *memberList = &linker->exTypeExtra[0];
37 return getTypeID(memberList[exType.memberOffset + member]);
38 }
39 NULLCArray MemberName(int member, int* type)
40 {
41 assert(linker);

Callers

nothing calls this directly

Calls 3

assertFunction · 0.85
getTypeIDFunction · 0.85
nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected