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

Method load

src/hx/cppia/CppiaFunction.cpp:967–987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967void CppiaFunction::load(CppiaStream &stream,bool inExpectBody)
968{
969 nameId = stream.getInt();
970 name = cppia.strings[ nameId ].utf8_str();
971 stream.module->creatingFunction = name.c_str();
972 returnType = stream.getInt();
973 argCount = stream.getInt();
974 DBGLOG(" Function %s(%d) : %s %s%s\n", name.c_str(), argCount, cppia.typeStr(returnType), isStatic?"static":"instance", isDynamic ? " DYNAMIC": "");
975 args.resize(argCount);
976 for(int a=0;a<argCount;a++)
977 {
978 ArgInfo &arg = args[a];
979 arg.nameId = stream.getInt();
980 arg.optional = stream.getBool();
981 arg.typeId = stream.getInt();
982 DBGLOG(" arg %c%s:%s\n", arg.optional?'?':' ', cppia.identStr(arg.nameId), cppia.typeStr(arg.typeId) );
983 }
984 if (inExpectBody)
985 funExpr = (ScriptCallable *)createCppiaExpr(stream);
986 stream.module->creatingFunction = 0;
987}
988
989void CppiaFunction::link( )
990{

Callers

nothing calls this directly

Calls 7

createCppiaExprFunction · 0.85
utf8_strMethod · 0.80
c_strMethod · 0.80
typeStrMethod · 0.80
identStrMethod · 0.80
getIntMethod · 0.45
getBoolMethod · 0.45

Tested by

no test coverage detected