Eo abstract class: Rename to Eo.Class.

This commit is contained in:
Tom Hacohen 2016-05-12 14:33:40 +01:00
parent 485ce14889
commit 6cacef2503
10 changed files with 15 additions and 14 deletions

View File

@ -3,7 +3,7 @@
eo_eolian_files = \
lib/eo/eo_base.eo \
lib/eo/eo_abstract_class.eo \
lib/eo/eo_class.eo \
lib/eo/eo_interface.eo
eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c)

View File

@ -4,8 +4,8 @@
generated_eo_cxx_bindings = \
lib/eo/eo_base.eo.hh \
lib/eo/eo_base.eo.impl.hh \
lib/eo/eo_abstract_class.eo.hh \
lib/eo/eo_abstract_class.eo.impl.hh
lib/eo/eo_class.eo.hh \
lib/eo/eo_class.eo.impl.hh
### Library

View File

@ -19,7 +19,7 @@ mixin Ector.Surface (Ector.Buffer)
[[Create a new renderer factory for the given type]]
return: Eo.Base *; /* FIXME: Should be a more restricted type, only here for cyclic. */
params {
@in type: const(Eo.Abstract_Class) * @nonull; /* FIXME: Should probably be a more restricted type */
@in type: const(Eo.Class) * @nonull; /* FIXME: Should probably be a more restricted type */
}
}
}

View File

@ -117,6 +117,7 @@ typedef struct _Eo_Opaque Eo;
* The basic class type - should be removed, just for compat.
*/
typedef Eo Eo_Class;
#define _EO_CLASS_EO_CLASS_TYPE
/**
* @var _eo_class_creation_lock
@ -935,7 +936,7 @@ EAPI Eina_Bool eo_destructed_is(const Eo *obj);
* @{
*/
#include "eo_abstract_class.eo.h"
#include "eo_class.eo.h"
/**
* @}

View File

@ -5,7 +5,7 @@ include ../../Makefile_Eolian_Subbuild_Helper.am
### Library
eo_eolian_files = \
eo_base.eo \
eo_abstract_class.eo \
eo_class.eo \
eo_interface.eo
eo_eolian_c = $(eo_eolian_files:%.eo=%.eo.c)

View File

@ -760,7 +760,7 @@ eo_class_get(const Eo *eo_id)
if (_eo_is_a_class(eo_id))
{
EO_CLASS_POINTER_RETURN_VAL(eo_id, _klass, NULL);
return EO_ABSTRACT_CLASS_CLASS;
return EO_CLASS_CLASS;
}
EO_OBJ_POINTER_RETURN_VAL(eo_id, obj, NULL);
@ -1649,7 +1649,7 @@ eo_init(void)
EINA_LOG_STATE_INIT);
/* bootstrap EO_CLASS_CLASS */
(void) EO_ABSTRACT_CLASS_CLASS;
(void) EO_CLASS_CLASS;
return EINA_TRUE;
}

View File

@ -1,4 +0,0 @@
abstract Eo.Abstract_Class ()
{
data: null;
}

4
src/lib/eo/eo_class.eo Normal file
View File

@ -0,0 +1,4 @@
abstract Eo.Class ()
{
data: null;
}

View File

@ -4,5 +4,5 @@
#include "Eo.h"
#include "eo_abstract_class.eo.c"
#include "eo_class.eo.c"

View File

@ -730,7 +730,7 @@ START_TEST(eo_magic_checks)
fail_if(eo_class_get((Eo *) buf));
fail_if(eo_class_name_get((Eo_Class*) buf));
fail_if(eo_class_get(obj) != SIMPLE_CLASS);
fail_if(eo_class_get(SIMPLE_CLASS) != EO_ABSTRACT_CLASS_CLASS);
fail_if(eo_class_get(SIMPLE_CLASS) != EO_CLASS_CLASS);
simple_a_set((Eo_Class *) buf, 1);
simple_a_set(eo_super((Eo_Class *) buf, SIMPLE_CLASS), ++i);
simple_a_set(eo_super(SIMPLE_CLASS, (Eo_Class *) buf), ++i);