9effd917b4b54ffa9982fe2fc4a52fb74ebc43a6
[profile/ivi/eobj.git] / examples / constructors / simple2.c
1 #include "Eo.h"
2 #include "mixin.h"
3 #include "simple2.h"
4
5 #include "config.h"
6
7 #define MY_CLASS SIMPLE2_CLASS
8
9 static void
10 _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
11 {
12    eo_do_super(obj, eo_constructor());
13
14    eo_error_set(obj);
15 }
16
17 static void
18 _class_constructor(Eo_Class *klass)
19 {
20    const Eo_Op_Func_Description func_desc[] = {
21         EO_OP_FUNC(EO_BASE_ID(EO_BASE_SUB_ID_CONSTRUCTOR), _constructor),
22         EO_OP_FUNC_SENTINEL
23    };
24
25    eo_class_funcs_set(klass, func_desc);
26 }
27
28 static const Eo_Class_Description class_desc = {
29      "Simple2",
30      EO_CLASS_TYPE_REGULAR,
31      EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
32      NULL,
33      0,
34      _class_constructor,
35      NULL
36 };
37
38 EO_DEFINE_CLASS(simple2_class_get, &class_desc, EO_BASE_CLASS, NULL);
39