structures.c File Reference

Functions for work with C structures for OWL entities, KP and SS. More...

#include "structures.h"
#include "properties.h"
#include "classes.h"

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_property_value (prop_val_t *prop_val)
 Free property value struct.
void free_class (class_t *class)
 Free class structure.
void free_individual (individual_t *individual)
 Free individual structure.
int get_rtti_type (const void *entity)
 Gets RTTI.


Detailed Description

Functions for work with C structures for OWL entities, KP and SS.

Alexandr A. Lomov <lomov@cs.karelia.ru>

Date:
05 December, 2009

LICENSE

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.

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

DESCRIPTION

Contains functions for work with C structures for OWL entities, KP and SS. This file is part of PetrSU KP Library.

Copyright (C) 2009 - Alexander A. Lomov. All rights reserved.


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 ( prop_val_t prop_val  ) 

Free property value struct.

It checks object or data property given and then free data or object. Oject (individual) not freed if it has references from other individuals. Property not freed.

Parameters:
prop_val property value structure.

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.


doxygen