7 #include "../eunit_tests.h"
9 EAPI Eobj_Op COMP_BASE_ID = 0;
11 static const Eobj_Class *_my_class = NULL;
14 _a_get(Eobj *obj, void *class_data EINA_UNUSED, va_list *list)
17 a = va_arg(*list, int *);
18 eobj_do_super(obj, SIMPLE_A_GET(a));
22 _constructor(Eobj *obj, void *class_data EINA_UNUSED)
24 eobj_constructor_super(obj);
26 Eobj *simple = eobj_add(SIMPLE_CLASS, obj);
27 eobj_composite_object_attach(obj, simple);
28 eobj_event_callback_forwarder_add(simple, SIG_A_CHANGED, obj);
30 fail_if(eobj_composite_is(obj));
31 fail_if(!eobj_composite_is(simple));
33 eobj_do(obj, EOBJ_BASE_DATA_SET("simple-obj", simple, NULL));
39 _class_constructor(Eobj_Class *klass)
41 const Eobj_Op_Func_Description func_desc[] = {
42 EOBJ_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
46 eobj_class_funcs_set(klass, func_desc);
52 if (_my_class) return _my_class;
54 static const Eobj_Class_Description class_desc = {
56 EOBJ_CLASS_TYPE_REGULAR,
57 EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
66 return _my_class = eobj_class_new(&class_desc, EOBJ_BASE_CLASS,