_Eina_Model_Interface_Properties Struct Reference
[Data Model Type management]

Interface to manage model's properties. More...


Data Fields

Eina_Model_Interface base
 common interface methods
unsigned int version
 must be EINA_MODEL_INTERFACE_PROPERTIES_VERSION
Eina_Bool(* compare )(const Eina_Model *a, const Eina_Model *b, int *cmp)
 How to compare properties of this model.
Eina_Bool(* load )(Eina_Model *model)
 How to load properties of this model.
Eina_Bool(* unload )(Eina_Model *model)
 How to unload properties of this model.
Eina_Bool(* get )(const Eina_Model *model, const char *name, Eina_Value *value)
 Retrieve a property of this model given its name.
Eina_Bool(* set )(Eina_Model *model, const char *name, const Eina_Value *value)
 Set a property of this model given its name.
Eina_Bool(* del )(Eina_Model *model, const char *name)
 Delete a property given its name.
Eina_List *(* names_list_get )(const Eina_Model *model)
 List of stringshare with known property names.


Detailed Description

Interface to manage model's properties.

This extends Eina_Model_Interface as expected by interface name EINA_MODEL_INTERFACE_NAME_PROPERTIES.

This interface is meant to help managing properties of a model, it is used by EINA_MODEL_TYPE_MIXIN in order to configure methods for children independently from properties.

Since:
1.2

Field Documentation

Eina_Bool(* _Eina_Model_Interface_Properties::get)(const Eina_Model *model, const char *name, Eina_Value *value)

Retrieve a property of this model given its name.

The value will be returned as a copy and must be flushed with eina_value_flush(). The previous contents of value is ignored.

Eina_Bool(* _Eina_Model_Interface_Properties::set)(Eina_Model *model, const char *name, const Eina_Value *value)

Set a property of this model given its name.

The value is assumed to be valied and is copied internally, thus it can be safely cleared with eina_value_flush() after this function returns.