extern int my_init_count;
static void
+_simple_constructor(Eo *obj, void *class_data, va_list *list)
+{
+ Private_Data *pd = class_data;
+ int a;
+ a = va_arg(*list, int);
+
+ eo_do_super(obj, eo_constructor());
+
+ pd->a = a;
+ printf("%s %d\n", __func__, pd->a);
+
+ my_init_count++;
+}
+
+static void
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
eo_do_super(obj, eo_constructor());
const Eo_Op_Func_Description func_desc[] = {
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_DESTRUCTOR), _destructor),
+ EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_CONSTRUCTOR), _simple_constructor),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_SET), _a_set),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_B_SET), _b_set),
}
static const Eo_Op_Description op_desc[] = {
+ EO_OP_DESCRIPTION(SIMPLE_SUB_ID_CONSTRUCTOR, "Construct and set A."),
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_SET, "Set property A"),
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_A_GET, "Get property A"),
EO_OP_DESCRIPTION(SIMPLE_SUB_ID_B_SET, "Set property B"),
extern EAPI Eo_Op SIMPLE_BASE_ID;
enum {
+ SIMPLE_SUB_ID_CONSTRUCTOR,
SIMPLE_SUB_ID_A_SET,
SIMPLE_SUB_ID_A_GET,
SIMPLE_SUB_ID_B_SET,
#define SIMPLE_ID(sub_id) (SIMPLE_BASE_ID + sub_id)
+#define simple_constructor(a) SIMPLE_ID(SIMPLE_SUB_ID_CONSTRUCTOR), EO_TYPECHECK(int, a)
#define simple_a_set(a) SIMPLE_ID(SIMPLE_SUB_ID_A_SET), EO_TYPECHECK(int, a)
#define simple_a_get(a) SIMPLE_ID(SIMPLE_SUB_ID_A_GET), EO_TYPECHECK(int *, a)
#define simple_b_set(b) SIMPLE_ID(SIMPLE_SUB_ID_B_SET), EO_TYPECHECK(int, b)