enesim  0.0.23.1
Drawinglibrary
Defines | Typedefs | Functions
Descriptor
Object

Defines

#define ENESIM_OBJECT_DESCRIPTOR   enesim_object_descriptor_get()
#define ENESIM_OBJECT_BOILERPLATE(parent, type, class_type, prefix)
#define ENESIM_OBJECT_INSTANCE_BOILERPLATE(parent, type, class_type, prefix)
#define ENESIM_OBJECT_ABSTRACT_BOILERPLATE(parent, type, class_type, prefix)   ENESIM_OBJECT_BOILERPLATE(parent, type, class_type, prefix)
#define ENESIM_OBJECT_INSTANCE_NEW(prefix)

Typedefs

typedef void(* Enesim_Object_Descriptor_Class_Init )(void *c)
typedef void(* Enesim_Object_Descriptor_Instance_Init )(void *i)
typedef void(* Enesim_Object_Descriptor_Instance_Deinit )(void *i)
typedef struct
_Enesim_Object_Descriptor 
Enesim_Object_Descriptor

Functions

EAPI Enesim_Object_Descriptor * enesim_object_descriptor_new (Enesim_Object_Descriptor *parent, size_t class_size, Enesim_Object_Descriptor_Class_Init class_init, size_t instance_size, Enesim_Object_Descriptor_Instance_Init instance_init, Enesim_Object_Descriptor_Instance_Deinit instance_deinit, const char *name)
EAPI void * enesim_object_descriptor_instance_new (Enesim_Object_Descriptor *thiz, void *k)
EAPI Enesim_Object_Descriptor * enesim_object_descriptor_get (void)
EAPI const char * enesim_object_descriptor_name_get (Enesim_Object_Descriptor *thiz)
EAPI void * enesim_object_descriptor_private_get (Enesim_Object_Descriptor *thiz)
EAPI void enesim_object_descriptor_private_set (Enesim_Object_Descriptor *thiz, void *prv)

Define Documentation

#define ENESIM_OBJECT_BOILERPLATE (   parent,
  type,
  class_type,
  prefix 
)
Value:
static void _##prefix##_class_init(void *k);                \
    static void _##prefix##_instance_init(void *o);             \
    static void _##prefix##_instance_deinit(void *o);           \
    Enesim_Object_Descriptor * prefix##_descriptor_get(void)        \
    {                                   \
        static Enesim_Object_Descriptor *d = NULL;          \
        if (!d) d = enesim_object_descriptor_new(parent,        \
                sizeof(class_type), _##prefix##_class_init, \
                sizeof(type), _##prefix##_instance_init,    \
                _##prefix##_instance_deinit, #type);        \
        return d;                           \
    }                                   \
#define ENESIM_OBJECT_INSTANCE_BOILERPLATE (   parent,
  type,
  class_type,
  prefix 
)
Value:
static class_type prefix##_klass;                   \
    ENESIM_OBJECT_BOILERPLATE(parent, type, class_type, prefix)
#define ENESIM_OBJECT_INSTANCE_NEW (   prefix)
Value:
enesim_object_descriptor_instance_new(prefix##_descriptor_get(),\
                &prefix##_klass)

Function Documentation

EAPI Enesim_Object_Descriptor* enesim_object_descriptor_new ( Enesim_Object_Descriptor *  parent,
size_t  class_size,
Enesim_Object_Descriptor_Class_Init  class_init,
size_t  instance_size,
Enesim_Object_Descriptor_Instance_Init  instance_init,
Enesim_Object_Descriptor_Instance_Deinit  instance_deinit,
const char *  name 
)
 All Data Structures Variables