aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eo/mixin/mixin_inherit.c
blob: 160dfb38ead147b0323b00eb00a23731a100bea9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include "Eo.h"
#include "mixin_simple.h"
#include "mixin_mixin4.h"
#include "mixin_inherit.h"

#define MY_CLASS INHERIT_CLASS

static int
_a_get(Eo *obj, void *class_data EINA_UNUSED)
{
   int ret = 0;
   ret = eo_super_simple_a_get(MY_CLASS, obj);
   printf("%s %d\n", __func__, ret);

   return ret;
}

static Eo_Op_Description op_descs[] = {
     EO_OP_FUNC_OVERRIDE(simple_a_get, _a_get),
};

static const Eo_Class_Description class_desc = {
     EO_VERSION,
     "Inherit",
     EO_CLASS_TYPE_REGULAR,
     EO_CLASS_DESCRIPTION_OPS(op_descs),
     NULL,
     0,
     NULL,
     NULL
};

EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, MIXIN4_CLASS, NULL);