Xonotic
enumclass.qh File Reference
#include "oo.qh"
+ Include dependency graph for enumclass.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CASE(class, id)   class class##_##id; STATIC_INIT(class##_##id) { entity e = class##_##id = NEW(class); e.enum_ordinal = class##_count++; }
 
#define ENUMCAST(T, it)   ftoe(etof(T##_Null__) + (it))
 
#define ENUMCLASS(id)   CLASS(id, Object) int id##_count; const noref entity id##_Null = nil; CASE(id, Null__)
 
#define ENUMCLASS_END(id)   ENDCLASS(id)
 
#define ORDINAL(it)   ((it).enum_ordinal)
 

Variables

int enum_ordinal
 

Macro Definition Documentation

◆ CASE

#define CASE (   class,
  id 
)    class class##_##id; STATIC_INIT(class##_##id) { entity e = class##_##id = NEW(class); e.enum_ordinal = class##_count++; }

Definition at line 23 of file enumclass.qh.

Referenced by GENERIC_COMMAND(), Get_Notif_TypeName(), and STATIC_INIT().

◆ ENUMCAST

#define ENUMCAST (   T,
  it 
)    ftoe(etof(T##_Null__) + (it))

Definition at line 26 of file enumclass.qh.

Referenced by Local_Notification_WOVA().

◆ ENUMCLASS

#define ENUMCLASS (   id)    CLASS(id, Object) int id##_count; const noref entity id##_Null = nil; CASE(id, Null__)

Definition at line 22 of file enumclass.qh.

Referenced by GENERIC_COMMAND(), Get_Notif_TypeName(), and STATIC_INIT().

◆ ENUMCLASS_END

#define ENUMCLASS_END (   id)    ENDCLASS(id)

Definition at line 24 of file enumclass.qh.

Referenced by GENERIC_COMMAND(), Get_Notif_TypeName(), and STATIC_INIT().

◆ ORDINAL

#define ORDINAL (   it)    ((it).enum_ordinal)

Variable Documentation

◆ enum_ordinal

int enum_ordinal

Definition at line 21 of file enumclass.qh.