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

Method ConstructEnum

src/hx/cppia/CppiaClasses.cpp:1663–1670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1661 bool __IsEnum() HXCPP_OVERRIDE { return info->isEnum; }
1662
1663 Dynamic ConstructEnum(String inName, hx::DynamicArray inArgs) HXCPP_OVERRIDE
1664 {
1665 if (!info->isEnum)
1666 return Dynamic();
1667
1668 int index = info->getEnumIndex(inName);
1669 return info->enumConstructors[index]->create(inArgs);
1670 }
1671
1672 bool VCanCast(hx::Object *inPtr) HXCPP_OVERRIDE
1673 {

Callers 3

SLJIT_CALL createEnumFunction · 0.45
getValueMethod · 0.45
runObjectMethod · 0.45

Calls 3

getEnumIndexMethod · 0.80
DynamicClass · 0.50
createMethod · 0.45

Tested by

no test coverage detected