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

Method GetInstanceFields

src/hx/cppia/CppiaClasses.cpp:1594–1629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1592 }
1593
1594 Array<String> GetInstanceFields() HXCPP_OVERRIDE
1595 {
1596 Array<String> members = mSuper ? (*mSuper)->GetInstanceFields() : Array_obj<String>::__new(0,0);
1597
1598 for(int i=0;i<info->memberFunctions.size();i++)
1599 {
1600 CppiaFunction *func = info->memberFunctions[i];
1601 String name = func->getName();
1602 if (members->Find(name)<0)
1603 members->push(name);
1604 }
1605
1606 CppiaModule &module = info->cppia;
1607
1608 for(int i=0;i<info->memberVars.size();i++)
1609 {
1610 CppiaVar *var = info->memberVars[i];
1611 if (var->isVirtual)
1612 continue;
1613 String name = module.strings[var->nameId];
1614 if (members->Find(name)<0)
1615 members->push( name );
1616 }
1617
1618 for(int i=0;i<info->dynamicFunctions.size();i++)
1619 {
1620 CppiaVar *var = info->dynamicFunctions[i];
1621 if (var->isVirtual)
1622 continue;
1623 String name = module.strings[var->nameId];
1624 if (members->Find(name)<0)
1625 members->push(name);
1626 }
1627
1628 return members;
1629 }
1630
1631 void linkClass(CppiaModule &inModule,String inName)
1632 {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected