7 EAPI Eobj_Op MIXIN_BASE_ID = 0;
9 static const Eobj_Class *_my_class = NULL;
12 _add_and_print_set(Eobj *obj, void *class_data EINA_UNUSED, va_list *list)
15 eobj_do(obj, SIMPLE_A_GET(&a), SIMPLE_B_GET(&b));
16 x = va_arg(*list, const int);
17 printf("%s %d\n", __func__, a + b + x);
20 extern int my_init_count;
23 _constructor(Eobj *obj, void *class_data EINA_UNUSED)
25 eobj_constructor_super(obj);
31 _destructor(Eobj *obj, void *class_data EINA_UNUSED)
33 eobj_destructor_super(obj);
39 _class_constructor(Eobj_Class *klass)
41 const Eobj_Op_Func_Description func_desc[] = {
42 EOBJ_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
46 eobj_class_funcs_set(klass, func_desc);
52 if (_my_class) return _my_class;
54 static const Eobj_Op_Description op_desc[] = {
55 EOBJ_OP_DESCRIPTION(MIXIN_SUB_ID_ADD_AND_SET, "i", "Add A + B + param and print it"),
56 EOBJ_OP_DESCRIPTION_SENTINEL
59 static const Eobj_Class_Description class_desc = {
61 EOBJ_CLASS_TYPE_MIXIN,
62 EOBJ_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),
71 return _my_class = eobj_class_new(&class_desc, NULL, NULL);