API - SmartSlog KP Library
|
Functions for work with properties. More...
Functions | |
int | sslog_update_value_struct (prop_val_t *prop_value, void *new_data) |
Update property value. | |
int | set_property_by_name (individual_t *ind, char *propname, void *value) |
SSLOG_EXTERN int | sslog_add_property (void *entity, property_t *prop, const 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. | |
SSLOG_EXTERN const prop_val_t * | sslog_get_property (individual_t *ind, const char *propname) |
Gets first found property by name. | |
const list_t * | get_property_node (individual_t *ind, const char *propname) |
Gets firts foundnode of properties list with given property name. | |
SSLOG_EXTERN const prop_val_t * | sslog_get_property_by_value (individual_t *ind, const char *propname, void *data) |
Get property value with given data. | |
SSLOG_EXTERN list_t * | sslog_get_property_all (individual_t *ind, const char *propname) |
Get all properties with given name. | |
SSLOG_EXTERN int | sslog_update_property (void *entity, const char *propname, void *new_data) |
Update property with given name. | |
SSLOG_EXTERN int | sslog_update_property_with_value (void *entity, const char *propname, const void *old_data, void *new_data) |
Update property using old value. | |
SSLOG_EXTERN int | sslog_remove_property (individual_t *ind, property_t *prop) |
SSLOG_EXTERN int | sslog_remove_property_with_value (individual_t *ind, property_t *prop, void *data) |
Unset property value. | |
SSLOG_EXTERN const property_t * | sslog_get_property_type (const class_t *ont_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. (Not implemented) | |
SSLOG_EXTERN bool | sslog_is_object_property (property_t *prop) |
Functions for work with properties.
Alaxandr A. Lomov lomov @cs. karel ia.r u
PetrSU KP library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
SmartSlog 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 SmartSlog KP Library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Contains functions for work with properties. This file is part of SmartSlog KP Library.
const list_t* get_property_node | ( | individual_t * | ind, |
const char * | propname | ||
) |
Gets firts foundnode of properties list with given property name.
ind | individual. |
propname | name of property. |
bool is_individual_has_property | ( | individual_t * | individual, |
property_t * | prop | ||
) |
Checks property for individual. (Not implemented)
individual | individual. |
prop | property. |
int set_property_by_name | ( | individual_t * | ind, |
char * | propname, | ||
void * | value | ||
) |
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. |
SSLOG_EXTERN int sslog_add_property | ( | void * | entity, |
property_t * | prop, | ||
const void * | value | ||
) |
Set new property for entity.
Sets property for one individual or whole class (not implemented yet). Create new value from given if setting data property, or assigns given value(individual) to property.
ind | individual or class. |
property | property. |
value | value to set. |
SSLOG_EXTERN const prop_val_t* sslog_get_property | ( | individual_t * | ind, |
const char * | propname | ||
) |
Gets first found property by name.
ind | individual. |
propname | name of property. |
SSLOG_EXTERN list_t* sslog_get_property_all | ( | individual_t * | ind, |
const char * | propname | ||
) |
Get all properties with given name.
ind | individual. |
propname | name of property. |
SSLOG_EXTERN const prop_val_t* sslog_get_property_by_value | ( | individual_t * | ind, |
const char * | propname, | ||
void * | data | ||
) |
Get property value with given data.
ind | individual. |
propname | name of property. |
data | value of property. |
SSLOG_EXTERN const property_t* sslog_get_property_type | ( | const class_t * | ont_class, |
const char * | propname | ||
) |
Get property struct by given name.
ont_class | class. |
propname | name of property. |
SSLOG_EXTERN bool sslog_is_object_property | ( | property_t * | prop | ) |
SSLOG_EXTERN int sslog_remove_property | ( | individual_t * | ind, |
property_t * | prop | ||
) |
SSLOG_EXTERN int sslog_remove_property_with_value | ( | individual_t * | ind, |
property_t * | prop, | ||
void * | data | ||
) |
Unset property value.
ind | individual. |
propname | name of property. |
data | value of property. |
SSLOG_EXTERN int sslog_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. |
SSLOG_EXTERN int sslog_update_property_with_value | ( | 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. |
SSLOG_EXTERN int sslog_update_value_struct | ( | prop_val_t * | prop_value, |
void * | new_data | ||
) |
Update property value.
prop_value | value of property. |
new_data | new value of property. |