doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Variables
Class.h File Reference

Go to the source code of this file.

Classes

struct  idEventFunc< Type >
 
class  idEventArg
 
class  idAllocError
 
class  idClass
 
class  idTypeInfo
 

Macros

#define EVENT(event, function)   { &( event ), ( void ( idClass::* )( void ) )( &function ) },
 
#define END_CLASS   { NULL, NULL } };
 
#define CLASS_PROTOTYPE(nameofclass)
 
#define CLASS_DECLARATION(nameofsuperclass, nameofclass)
 
#define ABSTRACT_PROTOTYPE(nameofclass)
 
#define ABSTRACT_DECLARATION(nameofsuperclass, nameofclass)
 

Typedefs

typedef void(idClass::* eventCallback_t )(void)
 
typedef void(idClass::* classSpawnFunc_t )(void)
 

Variables

const idEventDef EV_Remove
 
const idEventDef EV_SafeRemove
 

Macro Definition Documentation

#define ABSTRACT_DECLARATION (   nameofsuperclass,
  nameofclass 
)
Value:
idTypeInfo nameofclass::Type( #nameofclass, #nameofsuperclass, \
( idEventFunc<idClass> * )nameofclass::eventCallbacks, nameofclass::CreateInstance, ( void ( idClass::* )( void ) )&nameofclass::Spawn, \
( void ( idClass::* )( idSaveGame * ) const )&nameofclass::Save, ( void ( idClass::* )( idRestoreGame * ) )&nameofclass::Restore ); \
idClass *nameofclass::CreateInstance( void ) { \
gameLocal.Error( "Cannot instanciate abstract class %s.", #nameofclass ); \
return NULL; \
} \
idTypeInfo *nameofclass::GetType( void ) const { \
return &( nameofclass::Type ); \
} \
idEventFunc<nameofclass> nameofclass::eventCallbacks[] = {
void void void void void Error(const char *fmt,...) const id_attribute((format(printf
Definition: Game_local.cpp:783
Definition: Class.h:174
#define NULL
Definition: Lib.h:88
idGameLocal gameLocal
Definition: Game_local.cpp:64

Definition at line 156 of file Class.h.

#define ABSTRACT_PROTOTYPE (   nameofclass)
Value:
public: \
static idTypeInfo Type; \
static idClass *CreateInstance( void ); \
virtual idTypeInfo *GetType( void ) const; \
static idEventFunc<nameofclass> eventCallbacks[]
Definition: Class.h:174

Definition at line 138 of file Class.h.

#define CLASS_DECLARATION (   nameofsuperclass,
  nameofclass 
)
Value:
idTypeInfo nameofclass::Type( #nameofclass, #nameofsuperclass, \
( idEventFunc<idClass> * )nameofclass::eventCallbacks, nameofclass::CreateInstance, ( void ( idClass::* )( void ) )&nameofclass::Spawn, \
( void ( idClass::* )( idSaveGame * ) const )&nameofclass::Save, ( void ( idClass::* )( idRestoreGame * ) )&nameofclass::Restore ); \
idClass *nameofclass::CreateInstance( void ) { \
try { \
nameofclass *ptr = new nameofclass; \
ptr->FindUninitializedMemory(); \
return ptr; \
} \
catch( idAllocError & ) { \
return NULL; \
} \
} \
idTypeInfo *nameofclass::GetType( void ) const { \
return &( nameofclass::Type ); \
} \
idEventFunc<nameofclass> nameofclass::eventCallbacks[] = {
Definition: Class.h:174
#define NULL
Definition: Lib.h:88

Definition at line 110 of file Class.h.

#define CLASS_PROTOTYPE (   nameofclass)
Value:
public: \
static idTypeInfo Type; \
static idClass *CreateInstance( void ); \
virtual idTypeInfo *GetType( void ) const; \
static idEventFunc<nameofclass> eventCallbacks[]
Definition: Class.h:174

Definition at line 92 of file Class.h.

#define END_CLASS   { NULL, NULL } };

Definition at line 54 of file Class.h.

#define EVENT (   event,
  function 
)    { &( event ), ( void ( idClass::* )( void ) )( &function ) },

Definition at line 53 of file Class.h.

Typedef Documentation

typedef void( idClass::* classSpawnFunc_t)(void)

Definition at line 169 of file Class.h.

typedef void( idClass::* eventCallback_t)(void)

Definition at line 44 of file Class.h.

Variable Documentation

const idEventDef EV_Remove
const idEventDef EV_SafeRemove