#include "structures.h"#include "utils/kp_debug.h"Go to the source code of this file.
Functions | |
| individual_t * | new_individual (const class_t *classtype) |
| Create new individual. | |
| list_t * | get_superclasses (const class_t *class) |
| Returns a list of superclasses. | |
| int | is_subclassof (const class_t *class, const class_t *super_class) |
| Checks is class has superclass. | |
| int | is_classtype_of (const individual_t *individual, const class_t *prent_class) |
| Checks type of individual. | |
| int | count_references_to_individual (individual_t *individual) |
| Count references to given individual. | |
| int | set_uuid (individual_t *ind, const char *uuid) |
| Set UUID. | |
| int | add_entity_to_repository (void *entity) |
| Add entity to repository. | |
| int | add_class_to_repository (class_t *class) |
| Add class to class repository. | |
| int | add_property_to_repository (property_t *property) |
| Add property to property repository. | |
| void | remove_entity_from_repository (void *entity) |
| Remove entity from repository. | |
| void | clean_repositories () |
| const property_t * | get_property_from_repository_by_name (const char *name) |
| Get property from repository by given name. | |
| const class_t * | get_class_from_repository_by_classtype (const char *classtype) |
| Get class from repository by given classtype. | |
| const individual_t * | get_individual_from_repository_by_uuid (const char *uuid) |
| Get individuals from repository by given uuid. | |
| const list_t * | get_individuals_from_repository_by_classtype (const char *classtype) |
| Get individuals from repository by given classtype. | |
| int add_class_to_repository | ( | class_t * | class | ) |
Add class to class repository.
It set error and return it on failure.
| class | class for insert. |
| int add_entity_to_repository | ( | void * | entity | ) |
Add entity to repository.
It set error and return it on failure. You need to add individual, if you create it manuly. Function
| entity | individual, property or class. |
| int add_property_to_repository | ( | property_t * | property | ) |
Add property to property repository.
It set error and return it on failure.
| property | for insert. |
| void clean_repositories | ( | ) |
| int count_references_to_individual | ( | individual_t * | individual | ) |
Count references to given individual.
It gets other individuals and search references to individual from their properties.
| individual | individual for count. |
| const class_t* get_class_from_repository_by_classtype | ( | const char * | classtype | ) |
Get class from repository by given classtype.
| classtype | name of classtype. |
| const individual_t* get_individual_from_repository_by_uuid | ( | const char * | uuid | ) |
Get individuals from repository by given uuid.
| uuid | individual's uuid. |
| const list_t* get_individuals_from_repository_by_classtype | ( | const char * | classtype | ) |
Get individuals from repository by given classtype.
| classtype | name of classtype. |
| const property_t* get_property_from_repository_by_name | ( | const char * | name | ) |
Get property from repository by given name.
| name | property name. |
| list_t* get_superclasses | ( | const class_t * | class | ) |
Returns a list of superclasses.
| class | class. |
| int is_classtype_of | ( | const individual_t * | individual, | |
| const class_t * | class | |||
| ) |
Checks type of individual.
| individual | object of some class for check. | |
| class | allaged class of individual. |
Checks is class has superclass.
| class | class for check. | |
| superclass | alleged superclass of class. |
| individual_t* new_individual | ( | const class_t * | class | ) |
Create new individual.
Create new individual without UUID.
| classtype | type of class. |
| void remove_entity_from_repository | ( | void * | entity | ) |
Remove entity from repository.
| entity | individual, class or property. |
| int set_uuid | ( | individual_t * | ind, | |
| const char * | uuid | |||
| ) |
Set UUID.
Set new UUID for individuals. You need reinit individual to work with SS.
| ind | individual. | |
| uuid | UUID. |