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

Method link

src/hx/cppia/CppiaClasses.cpp:209–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208 const char *getName() HXCPP_OVERRIDE { return "EnumField"; }
209 CppiaExpr *link(CppiaModule &inModule) HXCPP_OVERRIDE
210 {
211 TypeData *type = inModule.types[enumId];
212 if (type->cppiaClass)
213 {
214 if (!type->cppiaClass->isEnum)
215 throw "Field of non-enum";
216 value = type->cppiaClass->findEnum(fieldId);
217 }
218 else
219 {
220 enumClass = hx::Class_obj::Resolve(type->name);
221 if (!enumClass.mPtr)
222 {
223 printf("Could not find enum %s\n", type->name.out_str() );
224 throw "Bad enum";
225 }
226 enumName = inModule.strings[fieldId];
227 inModule.markable.push_back(this);
228 }
229
230 LinkExpressions(args,inModule);
231 return this;
232 }
233
234 hx::Object *getValue()
235 {

Callers

nothing calls this directly

Calls 2

LinkExpressionsFunction · 0.85
findEnumMethod · 0.80

Tested by

no test coverage detected