Eo: added a version field to the class description.

SVN revision: 73494
This commit is contained in:
Tom Hacohen 2012-07-09 09:09:46 +00:00
parent f88902722e
commit 08e6d4912d
41 changed files with 62 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#define MY_CLASS COMPLEX_CLASS
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Complex",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -13,6 +13,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Interface",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(&INTERFACE_BASE_ID, op_desc, INTERFACE_SUB_ID_LAST),

View File

@ -37,6 +37,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),

View File

@ -63,6 +63,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -58,6 +58,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Elw Box",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&ELW_BOX_BASE_ID, op_desc, ELW_BOX_SUB_ID_LAST),

View File

@ -41,6 +41,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Elw BoxedButton",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -99,6 +99,7 @@ static const Eo_Event_Description *event_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Elw Button",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&ELW_BUTTON_BASE_ID, op_desc, ELW_BUTTON_SUB_ID_LAST),

View File

@ -55,6 +55,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Elw Win",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -131,6 +131,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Evas Object",
EO_CLASS_TYPE_REGULAR_NO_INSTANT,
EO_CLASS_DESCRIPTION_OPS(&EXEVAS_OBJ_BASE_ID, op_desc, EXEVAS_OBJ_SUB_ID_LAST),

View File

@ -13,6 +13,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Interface",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(&INTERFACE_BASE_ID, op_desc, INTERFACE_SUB_ID_LAST),

View File

@ -37,6 +37,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),

View File

@ -63,6 +63,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -330,6 +330,12 @@ struct _Eo_Op_Description
*/
typedef struct _Eo_Op_Description Eo_Op_Description;
/**
* @def EO_VERSION
* The current version of EO.
*/
#define EO_VERSION 1
/**
* @struct _Eo_Class_Description
* This struct holds the description of a class.
@ -338,6 +344,7 @@ typedef struct _Eo_Op_Description Eo_Op_Description;
*/
struct _Eo_Class_Description
{
unsigned int version; /**< The current version of eo, use #EO_VERSION */
const char *name; /**< The name of the class. */
Eo_Class_Type type; /**< The type of the class. */
struct {

View File

@ -562,6 +562,7 @@ static const Eo_Event_Description *event_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Eo Base",
EO_CLASS_TYPE_REGULAR_NO_INSTANT,
EO_CLASS_DESCRIPTION_OPS(NULL, op_desc, EO_BASE_SUB_ID_LAST),

View File

@ -35,6 +35,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Inherit",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&INHERIT_BASE_ID, op_desc, INHERIT_SUB_ID_LAST),

View File

@ -52,6 +52,7 @@ static const Eo_Event_Description *event_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -48,6 +48,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Comp",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -55,6 +55,7 @@ static const Eo_Event_Description *event_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -54,6 +54,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),

View File

@ -90,6 +90,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -26,6 +26,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -24,6 +24,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple3",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -6,6 +6,7 @@
#define MY_CLASS SIMPLE4_CLASS
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple4",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -24,6 +24,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple5",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -26,6 +26,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple6",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -26,6 +26,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple7",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -53,6 +53,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -34,6 +34,7 @@ START_TEST(eo_incomplete_desc)
/* XXX: In real life this should be const, this is just for testing. */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, op_desc, 1),
@ -100,6 +101,7 @@ START_TEST(eo_inherit_errors)
const Eo_Class *klass_simple;
static const Eo_Class_Description class_desc_simple = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -110,6 +112,7 @@ START_TEST(eo_inherit_errors)
};
static const Eo_Class_Description class_desc_mixin = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -120,6 +123,7 @@ START_TEST(eo_inherit_errors)
};
static Eo_Class_Description class_desc = {
EO_VERSION,
"General",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -159,6 +163,7 @@ START_TEST(eo_inconsistent_mro)
const Eo_Class *klass_mixin3;
static const Eo_Class_Description class_desc_simple = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -169,6 +174,7 @@ START_TEST(eo_inconsistent_mro)
};
static const Eo_Class_Description class_desc_mixin = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -179,6 +185,7 @@ START_TEST(eo_inconsistent_mro)
};
static const Eo_Class_Description class_desc_mixin2 = {
EO_VERSION,
"Mixin2",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -189,6 +196,7 @@ START_TEST(eo_inconsistent_mro)
};
static const Eo_Class_Description class_desc_mixin3 = {
EO_VERSION,
"Mixin3",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -229,6 +237,7 @@ START_TEST(eo_bad_interface)
const Eo_Class *klass;
static Eo_Class_Description class_desc = {
EO_VERSION,
"Interface",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -307,6 +316,7 @@ START_TEST(eo_op_types)
const Eo_Class *klass;
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -31,6 +31,7 @@ START_TEST(eo_data_fetch)
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -72,6 +73,7 @@ START_TEST(eo_isa_tests)
{
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Iface",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -88,6 +90,7 @@ START_TEST(eo_isa_tests)
{
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -104,6 +107,7 @@ START_TEST(eo_isa_tests)
{
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -171,6 +175,7 @@ START_TEST(eo_static_classes)
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, op_desc, 1),
@ -231,6 +236,7 @@ START_TEST(eo_man_free)
/* Usually should be const, not const only for the test... */
static Eo_Class_Description class_desc = {
EO_VERSION,
"Simple2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),
@ -450,6 +456,7 @@ START_TEST(eo_op_errors)
eo_init();
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -6,6 +6,7 @@
#define MY_CLASS INHERIT_CLASS
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Inherit",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -67,6 +67,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Inherit2",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&INHERIT2_BASE_ID, op_desc, INHERIT2_SUB_ID_LAST),

View File

@ -29,6 +29,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Inherit3",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -65,6 +65,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -14,6 +14,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Interface",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(&INTERFACE_BASE_ID, op_desc, INTERFACE_SUB_ID_LAST),

View File

@ -15,6 +15,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Interface2",
EO_CLASS_TYPE_INTERFACE,
EO_CLASS_DESCRIPTION_OPS(&INTERFACE2_BASE_ID, op_desc, INTERFACE2_SUB_ID_LAST),

View File

@ -85,6 +85,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -51,6 +51,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(&MIXIN_BASE_ID, op_desc, MIXIN_SUB_ID_LAST),

View File

@ -54,6 +54,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin2",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -54,6 +54,7 @@ _class_constructor(Eo_Class *klass)
}
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Mixin3",
EO_CLASS_TYPE_MIXIN,
EO_CLASS_DESCRIPTION_OPS(NULL, NULL, 0),

View File

@ -62,6 +62,7 @@ static const Eo_Op_Description op_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),

View File

@ -96,6 +96,7 @@ static const Eo_Event_Description *event_desc[] = {
};
static const Eo_Class_Description class_desc = {
EO_VERSION,
"Simple",
EO_CLASS_TYPE_REGULAR,
EO_CLASS_DESCRIPTION_OPS(&SIMPLE_BASE_ID, op_desc, SIMPLE_SUB_ID_LAST),