Data Structures | |
struct | Object_s |
struct | ObjRefs_s |
Macros | |
#define | CLASS(o) ((Class *)(o)) |
#define | classDecl(name, extends, def) typedef struct name##_s {struct extends##_s base; def} name; extern Class * classObj(name); void __class_##name##_init (void) |
#define | classInit(name) __class_##name##_init() |
#define | classInitFunc(name) Class * classObj(name); void __class_##name##_init (void) |
#define | classObj(name) name##_class |
#define | instanceOf(obj, cl) (Object_InstaceOf((Object *)obj, cl##_class)) |
#define | methodCall(obj, m,...) ((obj)->m(obj, ##__VA_ARGS__)) |
#define | methodDecl(type, name,...) (* name) (struct type##_s *self, ##__VA_ARGS__) |
#define | new(cl,...) ((void *) (cl##_class->init (Object_Create(cl##_class, false) , ##__VA_ARGS__))) |
#define | newPerm(cl,...) ((void *) (cl##_class->init (Object_Create(cl##_class, true) , ##__VA_ARGS__))) |
#define | OBJECT(o) ((Object *)(o)) |
#define | release(obj) (Object_Release((Object *)obj)) |
#define | retain(obj) (Object_Retain((Object *)obj)) |
#define | superInit(cl, obj,...) (cl##_class->parent->init ((obj), ##__VA_ARGS__)) |
Typedefs | |
typedef struct Object_s | Object |
typedef void(* | Object_Deinit_t )(Object *obj) |
typedef Object *(* | Object_Init_t )(Object *obj,...) |
typedef struct ObjRefs_s | ObjRefs_t |
typedef void(* | ReplyHandler_t )(struct Object_s *retValue) |
Functions | |
classDecl (Class, Object, unsigned abstract:1;unsigned alwaysperm:1;unsigned int size;const char *name;struct Class_s *parent;Object_Init_t init;Object_Deinit_t deinit;) | |
void | Object_AddToRoot (Object *obj) |
Object * | Object_Create (Class *cl, qboolean perm) |
void | Object_Delete (Object *obj) |
void | Object_Garbage_Collect (void) |
void | Object_Init (void) |
qboolean | Object_InstanceOf (Object *obj, Class *cl) |
Object * | Object_Release (Object *obj) |
void | Object_RemoveFromRoot (Object *obj) |
Object * | Object_Retain (Object *obj) |
Variables | |
struct Class_s * | Object_class |
#define CLASS | ( | o | ) | ((Class *)(o)) |
#define classDecl | ( | name, | |
extends, | |||
def | |||
) | typedef struct name##_s {struct extends##_s base; def} name; extern Class * classObj(name); void __class_##name##_init (void) |
#define methodCall | ( | obj, | |
m, | |||
... | |||
) | ((obj)->m(obj, ##__VA_ARGS__)) |
#define new | ( | cl, | |
... | |||
) | ((void *) (cl##_class->init (Object_Create(cl##_class, false) , ##__VA_ARGS__))) |
#define newPerm | ( | cl, | |
... | |||
) | ((void *) (cl##_class->init (Object_Create(cl##_class, true) , ##__VA_ARGS__))) |
#define OBJECT | ( | o | ) | ((Object *)(o)) |
#define release | ( | obj | ) | (Object_Release((Object *)obj)) |
#define retain | ( | obj | ) | (Object_Retain((Object *)obj)) |
typedef void(* Object_Deinit_t)(Object *obj) |
typedef void(* ReplyHandler_t)(struct Object_s *retValue) |
classDecl | ( | Class | , |
Object | , | ||
unsigned abstract:1;unsigned alwaysperm:1;unsigned int size;const char *name;struct Class_s *parent;Object_Init_t init;Object_Deinit_t deinit; | |||
) |
void Object_AddToRoot | ( | Object * | obj | ) |
void Object_Delete | ( | Object * | obj | ) |
void Object_Garbage_Collect | ( | void | ) |
void Object_Init | ( | void | ) |
void Object_RemoveFromRoot | ( | Object * | obj | ) |
struct Class_s* Object_class |