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 "mixin_mixin.h"
|
|
|
|
#include "mixin_simple.h"
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-04-23 01:09:54 -07:00
|
|
|
#define MY_CLASS MIXIN_CLASS
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2013-11-08 02:48:55 -08:00
|
|
|
static int
|
|
|
|
_ab_sum_get(Eo *obj, void *class_data EINA_UNUSED)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2013-12-30 13:16:55 -08:00
|
|
|
int a = 0, b = 0;
|
2014-04-02 01:46:34 -07:00
|
|
|
eo_do(obj, a = simple_a_get(), b = simple_b_get());
|
2012-05-01 00:40:14 -07:00
|
|
|
printf("%s %s\n", eo_class_name_get(MY_CLASS), __func__);
|
2013-11-08 02:48:55 -08:00
|
|
|
return a + b;
|
2012-04-05 08:31:15 -07:00
|
|
|
}
|
|
|
|
|
2015-05-19 03:41:27 -07:00
|
|
|
static Eo *
|
2013-11-08 02:48:55 -08:00
|
|
|
_constructor(Eo *obj, void *class_data EINA_UNUSED)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2015-05-19 03:41:27 -07:00
|
|
|
return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
|
2012-04-05 08:31:15 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-11-08 02:48:55 -08:00
|
|
|
_destructor(Eo *obj, void *class_data EINA_UNUSED)
|
2012-04-05 08:31:15 -07:00
|
|
|
{
|
2014-04-02 01:46:34 -07:00
|
|
|
eo_do_super(obj, MY_CLASS, eo_destructor());
|
2012-04-05 08:31:15 -07:00
|
|
|
}
|
|
|
|
|
2014-04-02 01:46:34 -07:00
|
|
|
EAPI EO_FUNC_BODY(mixin_ab_sum_get, int, 0);
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2014-04-02 01:46:34 -07:00
|
|
|
static Eo_Op_Description op_descs[] = {
|
|
|
|
EO_OP_FUNC_OVERRIDE(eo_constructor, _constructor),
|
|
|
|
EO_OP_FUNC_OVERRIDE(eo_destructor, _destructor),
|
2015-09-28 06:15:15 -07:00
|
|
|
EO_OP_FUNC(mixin_ab_sum_get, _ab_sum_get),
|
2012-04-23 01:09:54 -07:00
|
|
|
};
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
static const Eo_Class_Description class_desc = {
|
2014-04-02 01:46:34 -07:00
|
|
|
EO_VERSION,
|
2012-04-23 01:09:54 -07:00
|
|
|
"Mixin",
|
2012-05-01 00:40:14 -07:00
|
|
|
EO_CLASS_TYPE_MIXIN,
|
2014-04-02 01:46:34 -07:00
|
|
|
EO_CLASS_DESCRIPTION_OPS(op_descs),
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL,
|
|
|
|
0,
|
2013-11-08 02:48:55 -08:00
|
|
|
NULL,
|
2012-04-23 01:09:54 -07:00
|
|
|
NULL
|
|
|
|
};
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2014-04-02 04:01:16 -07:00
|
|
|
EO_DEFINE_CLASS(mixin_class_get, &class_desc, NULL, EO_CLASS, NULL)
|
2012-04-05 08:31:15 -07:00
|
|
|
|