summaryrefslogtreecommitdiff
path: root/src/tests/eo/mixin/mixin_inherit.c
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-09-26 06:56:52 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-09-26 06:56:52 +0000
commit3b5a3448b7dfc53c2f129bdb04bea9f7a02741a6 (patch)
tree18ad8a6b1841e9832c85a46f887b2cd6d6dacc4b /src/tests/eo/mixin/mixin_inherit.c
parent195d31c73fef88cfaa803b07b2ae3cba983a4093 (diff)
merge: add eo
SVN revision: 77072
Diffstat (limited to 'src/tests/eo/mixin/mixin_inherit.c')
-rw-r--r--src/tests/eo/mixin/mixin_inherit.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/tests/eo/mixin/mixin_inherit.c b/src/tests/eo/mixin/mixin_inherit.c
new file mode 100644
index 0000000000..4dc8fd9e15
--- /dev/null
+++ b/src/tests/eo/mixin/mixin_inherit.c
@@ -0,0 +1,42 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "Eo.h"
6#include "mixin_simple.h"
7#include "mixin_mixin4.h"
8#include "mixin_inherit.h"
9
10#define MY_CLASS INHERIT_CLASS
11
12static void
13_a_get(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
14{
15 int *name = va_arg(*list, int *);
16 eo_do_super(obj, simple_a_get(name));
17 printf("%s\n", __func__);
18}
19
20static void
21_class_constructor(Eo_Class *klass)
22{
23 const Eo_Op_Func_Description func_desc[] = {
24 EO_OP_FUNC(SIMPLE_ID(SIMPLE_SUB_ID_A_GET), _a_get),
25 EO_OP_FUNC_SENTINEL
26 };
27
28 eo_class_funcs_set(klass, func_desc);
29}
30
31static const Eo_Class_Description class_desc = {
32 EO_VERSION,
33 "Inherit",
34 EO_CLASS_TYPE_REGULAR,
35 EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
36 NULL,
37 0,
38 _class_constructor,
39 NULL
40};
41
42EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, MIXIN4_CLASS, NULL);