2012-09-07 14:56:44 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
#include "Eo.h"
|
2012-09-25 23:56:52 -07:00
|
|
|
#include "access_simple.h"
|
|
|
|
#include "access_simple_protected.h"
|
|
|
|
#include "access_inherit.h"
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
EAPI Eo_Op INHERIT_BASE_ID = 0;
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-04-23 01:09:54 -07:00
|
|
|
#define MY_CLASS INHERIT_CLASS
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
static void
|
2012-06-26 20:58:45 -07:00
|
|
|
_prot_print(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2013-03-19 23:56:15 -07:00
|
|
|
Simple_Protected_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS);
|
2012-04-05 08:31:15 -07:00
|
|
|
(void) list;
|
|
|
|
printf("%s %d\n", __func__, pd->protected_x1);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-09-27 08:26:25 -07:00
|
|
|
_class_constructor(Eo_Class *klass)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2012-05-01 00:40:14 -07:00
|
|
|
const Eo_Op_Func_Description func_desc[] = {
|
2012-06-26 20:58:45 -07:00
|
|
|
EO_OP_FUNC(INHERIT_ID(INHERIT_SUB_ID_PROT_PRINT), _prot_print),
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_OP_FUNC_SENTINEL
|
2012-04-05 08:31:15 -07:00
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
eo_class_funcs_set(klass, func_desc);
|
2012-04-05 08:31:15 -07:00
|
|
|
}
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
static const Eo_Op_Description op_desc[] = {
|
2012-06-26 20:58:45 -07:00
|
|
|
EO_OP_DESCRIPTION(INHERIT_SUB_ID_PROT_PRINT, "Print protected var x1."),
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_OP_DESCRIPTION_SENTINEL
|
2012-04-23 01:09:54 -07:00
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
static const Eo_Class_Description class_desc = {
|
2012-07-09 02:09:46 -07:00
|
|
|
EO_VERSION,
|
2012-04-23 01:09:54 -07:00
|
|
|
"Inherit",
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_CLASS_TYPE_REGULAR,
|
|
|
|
EO_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL,
|
|
|
|
0,
|
|
|
|
_class_constructor,
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL)
|