3 #include "simple_protected.h"
9 EAPI Eobj_Op INHERIT_BASE_ID = 0;
11 static const Eobj_Class *_my_class = NULL;
14 _prot_print(Eobj *obj, void *class_data EINA_UNUSED, va_list *list)
16 Simple_Protected_Data *pd = eobj_data_get(obj, SIMPLE_CLASS);
18 printf("%s %d\n", __func__, pd->protected_x1);
22 _class_constructor(Eobj_Class *klass)
24 const Eobj_Op_Func_Description func_desc[] = {
25 EOBJ_OP_FUNC(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
29 eobj_class_funcs_set(klass, func_desc);
33 inherit_class_get(void)
35 if (_my_class) return _my_class;
37 static const Eobj_Op_Description op_desc[] = {
38 EOBJ_OP_DESCRIPTION(INHERIT_SUB_ID_PROT_PRINT, "", "Print protected var x1."),
39 EOBJ_OP_DESCRIPTION_SENTINEL
42 static const Eobj_Class_Description class_desc = {
44 EOBJ_CLASS_TYPE_REGULAR,
45 EOBJ_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),
54 return _my_class = eobj_class_new(&class_desc, SIMPLE_CLASS, NULL);