MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / GetClassFields

Method GetClassFields

src/hx/cppia/CppiaClasses.cpp:1505–1541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1503}
1504
1505Array<String> CppiaClassInfo::GetClassFields()
1506{
1507 Array<String> result = Array_obj<String>::__new();
1508
1509 if (isEnum)
1510 {
1511 for(int i=0;i<enumConstructors.size();i++)
1512 result->push(enumConstructors[i]->name);
1513 }
1514 else
1515 {
1516
1517 for(int i=0;i<staticVars.size();i++)
1518 {
1519 CppiaVar &var = *staticVars[i];
1520 if (var.isVirtual)
1521 continue;
1522 result->push(var.name);
1523 }
1524
1525 for(int i=0;i<staticDynamicFunctions.size();i++)
1526 {
1527 CppiaVar &var = *staticDynamicFunctions[i];
1528 if (var.isVirtual)
1529 continue;
1530 result->push(var.name);
1531 }
1532
1533 for(int i=0;i<staticFunctions.size();i++)
1534 {
1535 CppiaFunction &func = *staticFunctions[i];
1536 result->push(func.getName());
1537 }
1538 }
1539
1540 return result;
1541}
1542
1543
1544void CppiaClassInfo::markInstance(hx::Object *inThis, hx::MarkContext *__inCtx)

Callers 1

GetClassFieldsMethod · 0.45

Calls 4

__newFunction · 0.85
sizeMethod · 0.45
pushMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected