Data Structures | |
struct | _Eo_Op_Description |
struct | _Eo_Ops |
This struct holds the ops and the size of the ops. More... | |
struct | _Eo_Class_Description |
This struct holds the description of a class. More... | |
Macros | |
#define | EO_DEFINE_CLASS(class_get_func_name, class_desc, parent_class, ...) |
A convenience macro to be used for creating the class_get function. More... | |
#define | EO_VERSION 2 |
The current version of EO. | |
#define | EO_OVERRIDE_OPS_DEFINE(ops, ...) |
Define an array of override functions for eo_override. More... | |
Typedefs | |
typedef enum _Eo_Class_Type | Eo_Class_Type |
A convenience typedef for _Eo_Class_Type. | |
typedef struct _Eo_Op_Description | Eo_Op_Description |
typedef struct _Eo_Ops | Eo_Ops |
typedef struct _Eo_Class_Description | Eo_Class_Description |
A convenience typedef for _Eo_Class_Description. | |
Enumerations | |
enum | _Eo_Class_Type { EO_CLASS_TYPE_REGULAR = 0, EO_CLASS_TYPE_REGULAR_NO_INSTANT, EO_CLASS_TYPE_INTERFACE, EO_CLASS_TYPE_MIXIN } |
An enum representing the possible types of an Eo class. More... | |
Functions | |
EAPI const Eo_Class * | eo_class_new (const Eo_Class_Description *desc, const Eo_Class *parent,...) |
Create a new class. More... | |
EAPI Eina_Bool | eo_override (Eo *obj, const Eo_Ops *ops) |
Override Eo functions of this object. More... | |
EAPI Eina_Bool | eo_isa (const Eo *obj, const Eo_Class *klass) |
Check if an object "is a" klass. More... | |
EAPI const char * | eo_class_name_get (const Eo_Class *klass) |
Gets the name of the passed class. More... | |
#define EO_DEFINE_CLASS | ( | class_get_func_name, | |
class_desc, | |||
parent_class, | |||
... | |||
) |
A convenience macro to be used for creating the class_get function.
This macro is fairly simple but should still be used as it'll let us improve things easily.
class_get_func_name | the name of the wanted class_get function name. |
class_desc | the class description. |
parent_class | The parent class for the function. Look at eo_class_new() for more information. |
... | List of extensions. Look at eo_class_new() for more information. |
You must use this macro if you want thread safety in class creation.
#define EO_OVERRIDE_OPS_DEFINE | ( | ops, | |
... | |||
) |
Define an array of override functions for eo_override.
ops | A name for the Eo_Ops local variable to define |
... | A comma separated list of Eo_Op overrides, using #EO_OP_FUNC_OVERRIDE or #EO_OP_CLASS_FUNC_OVERRIDE |
This can be used as follows:
enum _Eo_Class_Type |
EAPI const Eo_Class* eo_class_new | ( | const Eo_Class_Description * | desc, |
const Eo_Class * | parent, | ||
... | |||
) |
Create a new class.
desc | the class description to create the class with. |
parent | the class to inherit from. |
... | A NULL terminated list of extensions (interfaces, mixins and the classes of any composite objects). |
You should use EO_DEFINE_CLASS. It'll provide thread safety and other features easily.
Override Eo functions of this object.
ops | The op description to override with. |
This lets you override all of the Eo functions of this object (this one included) and repalce them with ad-hoc implementation. The contents of the array are copied so they can for example reside on the stack.
You are only allowed to override functions that are defined in the class or any of its interfaces (that is, eo_isa returning true).
If ops
is #NULL, this will revert the obj
to its original class without any function overrides.
It is not possible to override a function table of an object when it's already been overridden. Call eo_override(obj, NULL) first if you really need to do that.
References EINA_FALSE, EINA_TRUE, and ERR.
Check if an object "is a" klass.
obj | The object to check |
klass | The klass to check against. |
EINA_TRUE
if obj implements klass, EINA_FALSE
otherwise.Notice: This function does not support composite objects.
References EINA_FALSE.
Referenced by ecore_con_url_additional_header_add(), ecore_con_url_additional_headers_clear(), ecore_con_url_cookies_clear(), ecore_con_url_cookies_file_add(), ecore_con_url_cookies_ignore_old_session_set(), ecore_con_url_cookies_init(), ecore_con_url_cookies_jar_file_set(), ecore_con_url_cookies_jar_write(), ecore_con_url_cookies_session_clear(), ecore_con_url_data_get(), ecore_con_url_data_set(), ecore_con_url_fd_set(), ecore_con_url_free(), ecore_con_url_ftp_upload(), ecore_con_url_ftp_use_epsv_set(), ecore_con_url_http_version_set(), ecore_con_url_httpauth_set(), ecore_con_url_proxy_password_set(), ecore_con_url_proxy_set(), ecore_con_url_proxy_username_set(), ecore_con_url_received_bytes_get(), ecore_con_url_response_headers_get(), ecore_con_url_ssl_ca_set(), ecore_con_url_ssl_verify_peer_set(), ecore_con_url_status_code_get(), ecore_con_url_time(), ecore_con_url_timeout_set(), ecore_con_url_verbose_set(), ecore_exe_auto_limits_set(), ecore_exe_callback_pre_free_set(), ecore_exe_close_stdin(), ecore_exe_data_get(), ecore_exe_data_set(), ecore_exe_event_data_get(), ecore_exe_flags_get(), ecore_exe_free(), ecore_exe_hup(), ecore_exe_interrupt(), ecore_exe_kill(), ecore_exe_pid_get(), ecore_exe_quit(), ecore_exe_send(), ecore_exe_signal(), ecore_exe_tag_get(), ecore_exe_tag_set(), ecore_exe_terminate(), edje_edit_sound_tones_list_get(), edje_evas_global_perspective_get(), evas_object_del(), evas_object_name_get(), evas_object_name_set(), evas_object_smart_clipped_clipper_get(), evas_object_smart_interface_get(), evas_object_smart_members_get(), evas_object_smart_type_check(), evas_object_smart_type_check_ptr(), evas_object_top_at_pointer_get(), and evas_textblock_text_utf8_to_markup().
Gets the name of the passed class.
klass | the class to work on. |
References _Eo_Ops::count, EINA_FALSE, eina_list_append(), eina_list_data_find_list(), eina_list_data_get(), EINA_LIST_FOREACH, eina_list_free(), eina_list_last(), eina_list_next(), eina_list_prepend(), eina_list_prev(), eina_list_remove_list(), eina_spinlock_free(), EINA_TRASH_CLEAN, EINA_TRUE, EO_CLASS_TYPE_MIXIN, ERR, mmap(), munmap(), _Eo_Class_Description::name, and _Eo_Class_Description::ops.