|
Data Structures |
| struct | geom_class |
| struct | geom_o |
| | Class geom_o declaration (ancestor of all classes). More...
|
| struct | geom_o_class |
Defines |
|
#define | GEOM_CLASS_ID_COUNT 0x100 |
|
#define | GEOM_CLASS(nclass) ((struct geom_class *)(void *)&GLUEE3(geom_, nclass, _class)) |
|
#define | GEOM_CLASS_VMT(c, v) (geom_##c##_class.v) |
| #define | GEOM_CLASS_HEAD(c, p) |
| #define | GEOM_CLASS_DEF(c) |
| #define | GEOM_CLASS_INIT(c) |
| #define | geom_o_VMT |
|
#define | geom_o_INIT .destroy = (void (*)(void *)) &geom_o_destroy, |
|
#define | GEOM_INSTANCE_IS_ASSERT(nclass, instance) GEOM_ASSERT2(instance_is,instance,GEOM_CLASS(nclass)) |
| | Assertion pass for any valid instance pointer, that is descendant of a given class.
|
|
#define | GEOM_INSTANCE_IS_ASSERTX(nclass, instance) ((struct geom_##nclass *)GEOM_ASSERTX2(instance_is,instance,GEOM_CLASS(nclass))) |
| #define | GEOM_INSTANCE_VMT(instance, nclass, entry) |
| | For a given instance returns item in virtual methods table.
|
|
#define | GEOM_INSTANCE_INIT(instance, nclass) do{geom_instance_init((instance),GEOM_CLASS(nclass));}while(0) |
| | Initialize buffer to a given class instance, no constructor is called.
|
|
#define | GEOM_INSTANCE_ZERO_INIT(instance, nclass) do{geom_instance_zero_init((instance),GEOM_CLASS(nclass));}while(0) |
| | Initialize zero buffer to a given class instance, no constructor is called.
|
|
#define | GEOM_INSTANCE_NEW(nclass) (geom_instance_new(GEOM_CLASS(nclass))) |
| | Allocate instance of a given class, no constructor is called.
|
|
#define | GEOM_INSTANCE_DESTROY(i) do{geom_instance_destroy(i);}while(0) |
| | Call virtual destructor and destroy instance.
|
| #define | GEOM_INSTANCE_DESTROY2(i, nclass) do{GEOM_INSTANCE_IS_ASSERT(nclass,i);GLUEE3(geom_,nclass,_destroy)((void *)i);}while(0) |
| | Direct call to destructor and destroy instance.
|
|
#define | GEOM_INSTANCE_FREE(i) do{GEOM_INSTANCE_DESTROY(i);xfree(i);}while(0) |
| | Call virtual destructor and free instance.
|
| #define | GEOM_INSTANCE_FREE2(i, nclass) do{GEOM_INSTANCE_DESTROY2(i,nclass);xfree(i);}while(0) |
| | Direct call to destructor and destroy instance.
|
|
#define | GEOM_INSTANCE_CREATE(instance, nclass, constructor) do{ GEOM_INSTANCE_INIT(instance,nclass); constructor((void *)(instance)); }while(0) |
| | Initialize buffer to a given class instance and call constructor with only instance parameter.
|
|
#define | GEOM_INSTANCE_ZERO_CREATE(instance, nclass, constructor) do{ GEOM_INSTANCE_ZERO_INIT(instance,nclass); constructor((void *)(instance)); }while(0) |
| | Initialize zero buffer to a given class instance and call constructor with only instance parameter.
|
|
#define | GEOM_INSTANCE_CREATE2(instance, nclass, constructor,) do{ GEOM_INSTANCE_INIT(instance,nclass); constructor((void *)(instance), __VA_ARGS__); }while(0) |
| | Initialize buffer to a given class instance and call constructor with more parameters.
|
|
#define | GEOM_INSTANCE_ZERO_CREATE2(instance, nclass, constructor,) do{ GEOM_INSTANCE_ZERO_INIT(instance,nclass);constructor((void *)(instance), __VA_ARGS__); }while(0) |
| | Initialize zero buffer to a given class instance and call constructor with more parameters.
|
|
#define | GEOM_INSTANCE_NEW_CREATE(pinstance, nclass, constructor) do{ pinstance=GEOM_INSTANCE_NEW(nclass);constructor((void *)(pinstance)); }while(0) |
| | Allocate instance of a given class and call constructor with only instance parameter.
|
|
#define | GEOM_INSTANCE_NEW_CREATE2(pinstance, nclass, constructor,) do{ pinstance=GEOM_INSTANCE_NEW(nclass);constructor((void *)(pinstance), __VA_ARGS__); }while(0) |
| | Allocate instance of a given class and call constructor with more parameters.
|
|
#define | GEOM_INSTANCE_FLAGS(instance) (((struct geom_o *)(instance))->flags) |
|
#define | GEOM_INSTANCE_FLAGS2(instance) (((struct geom_o *)(instance))->flags2) |
Functions |
|
const struct geom_class * | geom_class_assert (GEOM_ASSERT_DEF, const struct geom_class *pclass) |
|
const void * | geom_instance_assert (GEOM_ASSERT_DEF, const void *instance) |
|
const void * | geom_instance_is_assert (GEOM_ASSERT_DEF, const void *instance, const struct geom_class *pclass) |
|
geom_class * | geom_instance_class (void *instance) |
| | Returns class pointer to a given instance.
|
| void * | geom_instance_init (void *instance, struct geom_class *pclass) |
| | Initialize buffer to a given class instance.
|
| void * | geom_instance_zero_init (void *instance, struct geom_class *pclass) |
| | Initialize zero buffer to a given class instance.
|
| void * | geom_instance_new (struct geom_class *pclass) |
| | Allocate and initialize.
|
|
void | geom_instance_destroy (void *instance) |
| | Call virtual destructor.
|
|
void | geom_o_create (const struct geom_o UNUSED *o) |
| | Empty constructor.
|
|
void | geom_o_destroy (const struct geom_o UNUSED *o) |
| | Empty destructor.
|
|
uns | geom_instance_size (const void *instance) |
| | Return size of a given instance structure in bytes.
|
|
char * | geom_instance_class_name (const void *instance) |
| | Return instance class name.
|
|
int | geom_instance_is (const void *instance, const struct geom_class *pclass) |
Variables |
|
uns | geom_class_count |
|
geom_class * | geom_class_table [GEOM_CLASS_ID_COUNT] |
|
geom_o_class | geom_o_class |