|
|
@ -41,7 +41,7 @@ |
|
|
(jCtor)jsonConst, \ |
|
|
(jCtor)jsonConst, \ |
|
|
(dtor)__destruct, \ |
|
|
(dtor)__destruct, \ |
|
|
(jTo)toJson \ |
|
|
(jTo)toJson \ |
|
|
}; const _CCLASS const __##class = &_class |
|
|
|
|
|
|
|
|
}; const _CCLASS const __##class = (const _CCLASS const)&_class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -62,12 +62,12 @@ typedef struct CCLASS { |
|
|
#define CCLASS_PTR_SIZE sizeof(struct CCLASS *) |
|
|
#define CCLASS_PTR_SIZE sizeof(struct CCLASS *) |
|
|
#define CCLASS_SIZE sizeof(struct CCLASS) |
|
|
#define CCLASS_SIZE sizeof(struct CCLASS) |
|
|
|
|
|
|
|
|
void * _new(const void * _class, ...); |
|
|
|
|
|
void * _newFromJson(const void * _class, struct json_object * json); |
|
|
|
|
|
|
|
|
void * _new(const _CCLASS _class, ...); |
|
|
|
|
|
void * _newFromJson(const _CCLASS _class, struct json_object * json); |
|
|
void delete(void * _object); |
|
|
void delete(void * _object); |
|
|
struct json_object * toJson(void * _object); |
|
|
struct json_object * toJson(void * _object); |
|
|
int isObject(void * _object); |
|
|
int isObject(void * _object); |
|
|
int _instanceOf(const void * _class, void * _object); |
|
|
|
|
|
|
|
|
int _instanceOf(const _CCLASS _class, void * _object); |
|
|
|
|
|
|
|
|
#define new(class, ...) _new((__##class), __VA_ARGS__) |
|
|
#define new(class, ...) _new((__##class), __VA_ARGS__) |
|
|
#define newFromJson(class, json) _newFromJson((__##class), (json)) |
|
|
#define newFromJson(class, json) _newFromJson((__##class), (json)) |
|
|
|