#include <string.h>
#include "properties.h"
#include "utils/list.h"
Functions | |
int | update_property_value_data (prop_val_t *prop_value, void *new_data) |
Update property value. | |
int | set_property_by_name (void *entity, char *propname, void *value) |
Set new property for entity. | |
int | set_property (void *entity, property_t *property, void *value) |
Set new property for entity. | |
int | set_property_with_prop_val (void *entity, const prop_val_t *prop_val) |
Set property with ginen prop_val_t struct. | |
const prop_val_t * | get_property (individual_t *ind, const char *propname) |
Get property by name. | |
const list_t * | get_property_node (individual_t *ind, const char *propname) |
Get node of properties list with given property name . | |
const prop_val_t * | get_property_with_data (individual_t *ind, const char *propname, void *data) |
Get property value with given data. | |
list_t * | get_properties (individual_t *ind, const char *propname) |
Get all properties with given name. | |
int | update_property (void *entity, const char *propname, void *new_data) |
Update property with given name. | |
int | update_property_with_data (void *entity, const char *propname, const void *old_data, void *new_data) |
Update property using old value. | |
int | unset_property_for_individual (individual_t *ind, char *propname, void *data) |
Unset property value. | |
const property_t * | get_property_type (const class_t *class, const char *propname) |
Get property struct by given name. | |
bool | is_individual_has_property (individual_t *individual, property_t *prop) |
Checks property for individual. | |
bool | is_prop_values_equal (prop_val_t *a, prop_val_t *b) |
Checks equality of given properties values. | |
bool | is_prop_names_equal (prop_val_t *a, prop_val_t *b) |
Checks equality of properties names of given properties values. |
list_t* get_properties | ( | individual_t * | ind, | |
const char * | propname | |||
) |
Get all properties with given name.
ind | individual. | |
propname | name of property. |
const prop_val_t* get_property | ( | individual_t * | ind, | |
const char * | propname | |||
) |
Get property by name.
ind | individual. | |
propname | name of property. |
const list_t* get_property_node | ( | individual_t * | ind, | |
const char * | propname | |||
) |
Get node of properties list with given property name .
ind | individual. | |
propname | name of property. |
const property_t* get_property_type | ( | const class_t * | class, | |
const char * | propname | |||
) |
Get property struct by given name.
class | class. | |
propname | name of property. |
const prop_val_t* get_property_with_data | ( | individual_t * | ind, | |
const char * | propname, | |||
void * | data | |||
) |
Get property value with given data.
ind | individual. | |
propname | name of property. | |
data | value of property. |
bool is_individual_has_property | ( | individual_t * | individual, | |
property_t * | prop | |||
) |
Checks property for individual.
individual | individual. | |
prop | property. |
bool is_prop_names_equal | ( | prop_val_t * | a, | |
prop_val_t * | b | |||
) |
Checks equality of properties names of given properties values.
a | one property value. | |
b | another property value. |
bool is_prop_values_equal | ( | prop_val_t * | a, | |
prop_val_t * | b | |||
) |
Checks equality of given properties values.
a | one property value. | |
b | another property value. |
int set_property | ( | void * | entity, | |
property_t * | property, | |||
void * | value | |||
) |
Set new property for entity.
Set property for one individuals or for all individuals from class.
entity | class or individual. | |
property | property. | |
value | value to set. |
int set_property_by_name | ( | void * | entity, | |
char * | propname, | |||
void * | value | |||
) |
Set new property for entity.
Set property for one individuals or for all individuals from class.
entity | class or individual. | |
propname | name of the property. | |
value | value to set. |
int set_property_with_prop_val | ( | void * | entity, | |
const prop_val_t * | prop_val | |||
) |
Set property with ginen prop_val_t struct.
Set property for one individuals or for all individuals from class.
entity | class or individual. | |
prop_val | value to set. |
int unset_property_for_individual | ( | individual_t * | ind, | |
char * | propname, | |||
void * | data | |||
) |
Unset property value.
ind | individual. | |
propname | name of property. | |
data | value of property. |
int update_property | ( | void * | entity, | |
const char * | propname, | |||
void * | new_data | |||
) |
Update property with given name.
ind | individual. | |
propname | name of property. | |
new_data | value of property. |
int update_property_value_data | ( | prop_val_t * | prop_value, | |
void * | new_data | |||
) |
Update property value.
prop_value | value of property. | |
new_data | new value of property. |
int update_property_with_data | ( | void * | entity, | |
const char * | propname, | |||
const void * | old_data, | |||
void * | new_data | |||
) |
Update property using old value.
ind | individual. | |
propname | name of property. | |
old_data | old value of property. | |
new_data | new value of property. |