| 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 | { |
nothing calls this directly
no test coverage detected