#include "structures.h"
#include "utils/list.h"
#include "utils/check_func.h"
#include "utils/kp_debug.h"
Go to the source code of this file.
Functions | |
const property_t * | get_property_type (const class_t *class, const char *propname) |
Get property struct by given name. | |
int | set_property_by_name (void *entity, char *propname, void *data) |
Set new property for entity. | |
int | set_property (void *entity, property_t *property, void *value) |
Set new property for entity. | |
int | set_property_with_value_struct (void *entity, const prop_val_t *prop_val) |
const prop_val_t * | get_property (individual_t *ind, const char *propname) |
Get property by 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 | update_property_value_data (prop_val_t *prop_value, void *new_data) |
int | unset_property_for_individual (individual_t *ind, char *propname, void *data) |
Unset property value. |
Alaxandr A. Lomov <lomov@cs.karelia.ru>
PetrSU KP library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with PetrSU KP library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
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 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. |
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_value_struct | ( | void * | entity, | |
const prop_val_t * | prop_val | |||
) |
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 | |||
) |
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. |