Go to the documentation of this file. 11 #define ENUMCLASS(id) USING(id, int); enum { CASE(id, Null) 12 #define CASE(class, id) class##_##id, 13 #define ENUMCLASS_END(id) }; 14 #define ORDINAL(it) (it) 15 #define ENUMCAST(T, it) (it) 22 #define ENUMCLASS(id) CLASS(id, Object) int id##_count; const noref entity id##_Null = nil; CASE(id, Null__) 23 #define CASE(class, id) class class##_##id; STATIC_INIT(class##_##id) { entity e = class##_##id = NEW(class); e.enum_ordinal = class##_count++; } 24 #define ENUMCLASS_END(id) ENDCLASS(id) 25 #define ORDINAL(it) ((it).enum_ordinal) 26 #define ENUMCAST(T, it) ftoe(etof(T##_Null__) + (it))