ender  0.0.9
Descriptorlibrary
Functions
Object

An object represents opaque structs. More...

Functions

EAPI Eina_Bool ender_item_object_string_to (Ender_Item *i, void *o, char **str, Ender_Item_Transfer *xfer, Eina_Error *err)
EAPI Ender_Itemender_item_object_downcast (Ender_Item *i, void *o)
EAPI Ender_Itemender_item_object_inherit_get (Ender_Item *i)
EAPI Eina_List * ender_item_object_functions_get (Ender_Item *i)
EAPI Eina_List * ender_item_object_ctor_get (Ender_Item *i)
EAPI Eina_List * ender_item_object_props_get (Ender_Item *i)
EAPI Eina_Bool ender_item_object_ref (Ender_Item *i, void *o)
EAPI Eina_Bool ender_item_object_unref (Ender_Item *i, void *o)

Detailed Description

An object represents opaque structs.

Basically an object must have constructors, a destructor and reference counting. It can also have functions and properties, and can inherit from another object.


Function Documentation

EAPI Eina_Bool ender_item_object_string_to ( Ender_Item i,
void *  o,
char **  str,
Ender_Item_Transfer xfer,
Eina_Error *  err 
)

Convert an object into a string

Looks for a property that has the flag of ENDER_ITEM_ATTR_FLAG_VALUE_OF that returns a string. If none is found, it looks for a method with flag ENDER_ITEM_FUNCTION_FLAG_VALUE_OF that returns a string, if so, it is called.

Parameters:
iThe object to convert
oThe object instance
[out]strThe converted string
[out]xferThe transfer of the string
[out]errIn case the call fails, the error informs what happened
Returns:
EINA_TRUE if the call is succesful, EINA_FALSE otherwise
EAPI Ender_Item* ender_item_object_downcast ( Ender_Item i,
void *  o 
)

Get the downcasted item of an object

Gets the value of a property that has the flag of ENDER_ITEM_ATTR_FLAG_DOWNCAST, if none is found, it looks for a method with flag ENDER_ITEM_FUNCTION_FLAG_DOWNCAST and uses it for downcasting.

Parameters:
iThe object to downcast
oThe object instance
Returns:
The downcasted item

Get the parent object in the inheritance hierarchy

Parameters:
iThe object to get the parent from
Returns:
The parent object
EAPI Eina_List* ender_item_object_functions_get ( Ender_Item i)

Get the list of functions from an object

Parameters:
iThe object to get the functions from
Returns:
The list of functions. Use ender_item_unref to free every item on the list
EAPI Eina_List* ender_item_object_ctor_get ( Ender_Item i)

Get the list of constructors from an object

Parameters:
iThe object to get the constructors from
Returns:
The list of construcots. Use ender_item_unref to free every item on the list
EAPI Eina_List* ender_item_object_props_get ( Ender_Item i)

Get the list of properties from an object

Parameters:
iThe object to get the properties from
Returns:
The list of properties. Use ender_item_unref to free every item on the list
EAPI Eina_Bool ender_item_object_ref ( Ender_Item i,
void *  o 
)

Call the object's ref function

Parameters:
iThe object to call the ref function on
oThe object instance
Returns:
EINA_TRUE if success, EINA_FALSE otherwise
EAPI Eina_Bool ender_item_object_unref ( Ender_Item i,
void *  o 
)

Call the object's unref function

Parameters:
iThe object to call the unref function on
oThe object instance
Returns:
EINA_TRUE if success, EINA_FALSE otherwise
 All Data Structures