ender  0.0.9
Descriptorlibrary
Enumerations | Functions
Attr

An attr represents a Object attribute. More...

Enumerations

enum  Ender_Item_Attr_Flag {
  ENDER_ITEM_ATTR_FLAG_VALUE_OF = (1 << 0),
  ENDER_ITEM_ATTR_FLAG_DOWNCAST = (1 << 1),
  ENDER_ITEM_ATTR_FLAG_NULLABLE = (1 << 2)
}

Functions

EAPI Ender_Itemender_item_attr_type_get (Ender_Item *i)
EAPI ssize_t ender_item_attr_offset_get (Ender_Item *i)
EAPI Eina_Bool ender_item_attr_value_get (Ender_Item *i, void *o, Ender_Item_Transfer *xfer, Ender_Value *v, Eina_Error *err)
EAPI Eina_Bool ender_item_attr_value_set (Ender_Item *i, void *o, Ender_Value *v, Eina_Error *err)
EAPI int ender_item_attr_flags_get (Ender_Item *i)
EAPI Ender_Itemender_item_attr_getter_get (Ender_Item *i)
EAPI Ender_Itemender_item_attr_setter_get (Ender_Item *i)

Detailed Description

An attr represents a Object attribute.


Enumeration Type Documentation

Different flags an attribute can have

Enumerator:
ENDER_ITEM_ATTR_FLAG_VALUE_OF 

In case the attribute represents a way to convert the item into another type

ENDER_ITEM_ATTR_FLAG_DOWNCAST 

In case the attribute returns an Item representing the downcasted value of the owner of the attribute

ENDER_ITEM_ATTR_FLAG_NULLABLE 

In case the attribute can be NULL


Function Documentation

Get the type of an attribute

Parameters:
iThe attribute to get the type from
Returns:
The type of an attribute
EAPI ssize_t ender_item_attr_offset_get ( Ender_Item i)

Get the offset of an attribute

This is only valid for attributes that Struct fields

Parameters:
iThe attribute to get the offset from
Returns:
The offset of an attribute
EAPI Eina_Bool ender_item_attr_value_get ( Ender_Item i,
void *  o,
Ender_Item_Transfer xfer,
Ender_Value v,
Eina_Error *  err 
)

Get the value from an attribute

Parameters:
iThe attribute to get the value from
oThe object instance that has such attribute
[out]xferThe transfer of the value. It is responsible of the caller to free the resource based on the transfer type
vThe value of the attribute
[out]errIn case the return value is EINA_FALSE, an error will be set
Returns:
EINA_TRUE if success, EINA_FALSE otherwise
EAPI Eina_Bool ender_item_attr_value_set ( Ender_Item i,
void *  o,
Ender_Value v,
Eina_Error *  err 
)

Set the value from an attribute

Parameters:
iThe attribute to set the value
oThe object instance that has such attribute
vThe value of the attribute
[out]errIn case the return value is EINA_FALSE, an error will be set
Returns:
EINA_TRUE if success, EINA_FALSE otherwise

Get the flags of an attribute

Parameters:
iThe attribute to get the flags from
Returns:
The attribute flags

Get the getter for the attribute

Parameters:
iThe attribute to get the getter from
Returns:
The getter function or NULL if there is no getter

Get the setter for the attribute

Parameters:
iThe attribute to get the setter from
Returns:
The setter function or NULL if there is no setter
 All Data Structures