structures.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include "utils/kp_bool.h"
#include "utils/list.h"

Go to the source code of this file.

Data Structures

struct  property_s
 Property structure, represents OWL property. More...
struct  prop_val_s
 Property value structure. More...
struct  class_s
 Class structure, represents OWL class. More...
struct  individual_s
 Individual structure. More...

Typedefs

typedef struct property_s property_t
 Property structure, represents OWL property.
typedef struct prop_val_s prop_val_t
 Property value structure.
typedef struct class_s class_t
 Class structure, represents OWL class.
typedef struct individual_s individual_t
 Individual structure.

Enumerations

enum  rtti_types {
  RTTI_MIN_VALUE = 0, RTTI_INDIVIDUAL = 1, RTTI_CLASS = 2, RTTI_PROPERTY = 3,
  RTTI_SBRC_CONTAINER, RTTI_MAX_VALUE
}
 Run-time type information. More...
enum  property_types { DATATYPEPROPERTY = 1, OBJECTPROPERTY = 2 }
 Types of properties. More...

Functions

void free_property (property_t *property)
 Free property structure.
void free_property_value_with_func (prop_val_t *prop_val, void(*free_data_func)(void *))
 Free property value struct.
void free_class (class_t *class)
 Free class structure.
void free_individual (individual_t *individual)
 Free individual structure.
prop_val_tnew_prop_value (property_t *prop, void *data)
 Create new property value structure.
int get_rtti_type (const void *entity)
 Gets RTTI.


Typedef Documentation

typedef struct class_s class_t

Class structure, represents OWL class.

typedef struct individual_s individual_t

Individual structure.

typedef struct prop_val_s prop_val_t

Property value structure.

Use for individuals.

typedef struct property_s property_t

Property structure, represents OWL property.


Enumeration Type Documentation

Types of properties.

Enumerator:
DATATYPEPROPERTY  Data-property type.
OBJECTPROPERTY  Object-property type.

enum rtti_types

Run-time type information.

Enumerator:
RTTI_MIN_VALUE  Use for check min value of rtti field.
RTTI_INDIVIDUAL  Individual type.
RTTI_CLASS  Class type.
RTTI_PROPERTY  Property type.
RTTI_SBRC_CONTAINER  Subscribe container type.
RTTI_MAX_VALUE  Use for check max value of rtti field.


Function Documentation

void free_class ( class_t class  ) 

Free class structure.

Properties, instances and superclasses not freed, only list struct.

Parameters:
class class structure.

void free_individual ( individual_t individual  ) 

Free individual structure.

Parent class not free.

Parameters:
class class structure.

void free_property ( property_t property  ) 

Free property structure.

Free all fields, subproperties not freed, only list structure and all nodes without data.

Parameters:
property property for free.

void free_property_value_with_func ( prop_val_t prop_val,
void(*)(void *)  free_data_func 
)

Free property value struct.

Property not freed.

Parameters:
prop_val property value structure.
free_data_func function for free property value or NULL.

int get_rtti_type ( const void *  entity  ) 

Gets RTTI.

Parameters:
entity some entity: individual, class or property.
Returns:
RTTI entity type on success or RTTI_MIN_VALUE (
See also:
rtti_types) otherwise.

prop_val_t* new_prop_value ( property_t prop,
void *  data 
)

Create new property value structure.

Parameters:
prop property for value.
data data for value of property.
Returns:
new property value structure or NULL on error.


doxygen