Data Model Properties
[Data Model API]
Properties and their usage with models.
More...Functions | |
Eina_Bool | eina_model_property_get (const Eina_Model *model, const char *name, Eina_Value *value) |
Gets the value of model's property named name. | |
Eina_Bool | eina_model_property_set (Eina_Model *model, const char *name, const Eina_Value *value) |
Sets the value of model's property named name to value. | |
Eina_Bool | eina_model_property_del (Eina_Model *model, const char *name) |
Deletes model's property named name. | |
Eina_List * | eina_model_properties_names_list_get (const Eina_Model *model) |
Gets a list of the names of every property of model. | |
void | eina_model_properties_names_list_free (Eina_List *list) |
Frees a list of names of properties gotten with eina_model_properties_names_list_get() . |
Detailed Description
Properties and their usage with models.Properties are attributes of model. They have a name and contain a data value (Generic Value Storage).
The actual values and their types, if it is possible to read and write them and if new properties can be created or deleted it is up to the type.
Function Documentation
Eina_Bool eina_model_property_get | ( | const Eina_Model * | model, | |
const char * | name, | |||
Eina_Value * | value | |||
) |
Gets the value of model's property named name.
- Parameters:
-
[in] model The model from which to get the property. [in] name The name of the property whose value is wanted. [out] value A pointer to an Eina_Value to receive the property's value.
- Returns:
- EINA_TRUE on success, EINA_FALSE on failure.
EINA_TRUE if model has a property named name, EINA_FALSE otherwise.
- Since:
- 1.2
References EINA_FALSE.
Eina_Bool eina_model_property_set | ( | Eina_Model * | model, | |
const char * | name, | |||
const Eina_Value * | value | |||
) |
Sets the value of model's property named name to value.
- Parameters:
-
model The model in which to set the property. name The name of the property whose value is to set. value A pointer to a const Eina_Value to containing the property's value.
- Returns:
- EINA_TRUE on success, EINA_FALSE on failure.
- Since:
- 1.2
Eina_Bool eina_model_property_del | ( | Eina_Model * | model, | |
const char * | name | |||
) |
Deletes model's property named name.
- Parameters:
-
model The model from which to delete the property. name The name of the property to delete.
- Returns:
- EINA_TRUE on success, EINA_FALSE on failure.
- Since:
- 1.2
References eina_error_set(), and EINA_FALSE.
Eina_List* eina_model_properties_names_list_get | ( | const Eina_Model * | model | ) |
Gets a list of the names of every property of model.
- Parameters:
-
model The model instance.
- Returns:
- Eina_List of names.
- Note:
- The returned list should be freed with
eina_model_properties_names_list_free()
.
- Since:
- 1.2
void eina_model_properties_names_list_free | ( | Eina_List * | list | ) |
Frees a list of names of properties gotten with eina_model_properties_names_list_get()
.
- Parameters:
-
list The list to free.
- Warning:
- Behavior is undefined if called on a list not gotten from
eina_model_properties_names_list_get()
.
- Since:
- 1.2
References EINA_LIST_FREE, and eina_stringshare_del().