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-04-23 01:09:54 -07:00
|
|
|
#define MY_CLASS INHERIT_CLASS
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
static void
|
2013-07-30 08:08:25 -07:00
|
|
|
_prot_print(Eo *obj, void *class_data EINA_UNUSED)
|
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
|
|
|
printf("%s %d\n", __func__, pd->protected_x1);
|
|
|
|
}
|
|
|
|
|
2013-07-30 08:08:25 -07:00
|
|
|
EAPI EO2_VOID_FUNC_BODY(inherit_prot_print);
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2013-11-07 06:47:58 -08:00
|
|
|
static Eo2_Op_Description op_descs[] = {
|
2013-11-11 05:27:36 -08:00
|
|
|
EO2_OP_FUNC(inherit_prot_print, _prot_print, "Print protected var x1."),
|
2013-07-30 08:08:25 -07:00
|
|
|
EO2_OP_SENTINEL
|
2012-04-23 01:09:54 -07:00
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
static const Eo_Class_Description class_desc = {
|
2013-07-30 08:08:25 -07:00
|
|
|
EO2_VERSION,
|
2012-04-23 01:09:54 -07:00
|
|
|
"Inherit",
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_CLASS_TYPE_REGULAR,
|
2013-11-07 06:47:58 -08:00
|
|
|
EO2_CLASS_DESCRIPTION_OPS(op_descs),
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL,
|
|
|
|
0,
|
2013-07-30 08:08:25 -07:00
|
|
|
NULL,
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL)
|