8 static const Eobj_Class *_my_class = NULL;
11 _add_and_print_set(Eobj *obj, void *class_data __UNUSED__, va_list *list)
14 eobj_do(obj, SIMPLE_A_GET(&a), SIMPLE_B_GET(&b));
15 x = va_arg(*list, const int);
16 printf("%s %d\n", eobj_class_name_get(eobj_class_get(obj)), a + b + x);
17 eobj_do_super(obj, MIXIN_ADD_AND_PRINT(x));
21 _constructor(Eobj *obj, void *class_data __UNUSED__)
23 eobj_constructor_super(obj);
27 _destructor(Eobj *obj, void *class_data __UNUSED__)
29 eobj_destructor_super(obj);
33 _class_constructor(Eobj_Class *klass)
35 const Eobj_Op_Func_Description func_desc[] = {
36 EOBJ_OP_FUNC(MIXIN_ID(MIXIN_SUB_ID_ADD_AND_SET), _add_and_print_set),
40 eobj_class_funcs_set(klass, func_desc);
44 mixin2_class_get(void)
46 if (_my_class) return _my_class;
48 static const Eobj_Class_Description class_desc = {
50 EOBJ_CLASS_TYPE_MIXIN,
51 EOBJ_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
60 _my_class = eobj_class_new(&class_desc, MIXIN_CLASS, NULL);