Internalfunctions - SmartSlog KP Library
Functions
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

SSLOG_EXTERN void sslog_free_property (property_t *property)
 Free property structure.
SSLOG_EXTERN void sslog_free_value_struct_with_func (prop_val_t *prop_val, void(*free_data_func)(void *))
 Free property value struct.
SSLOG_EXTERN void sslog_free_value_struct (prop_val_t *prop_val)
 Free property value struct.
SSLOG_EXTERN void sslog_free_data_property_value_struct (prop_val_t *prop_val)
 Free property value struct.
SSLOG_EXTERN void sslog_free_class (class_t *ont_class)
 Free class structure.
SSLOG_EXTERN void sslog_free_individual (individual_t *individual)
 Free individual structure.
SSLOG_EXTERN int sslog_get_rtti_type (const void *entity)
 Gets RTTI.
int get_sbcr_status (individual_t *individual)
 Gets subscription status of individuals.
int set_sbcr_status (individual_t *individual, int status)
 Sets subscription status.

Detailed Description

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

Aleksandr A. Lomov lomov.nosp@m.@cs..nosp@m.karel.nosp@m.ia.r.nosp@m.u

Date:
05 December, 2009

LICENSE

SmartSlog 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

DESCRIPTION

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

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


Function Documentation

int get_sbcr_status ( individual_t individual)

Gets subscription status of individuals.

Parameters:
individualindividuals to check.
Returns:
status (
See also:
subscribe_status) or -1 otherwise.
int set_sbcr_status ( individual_t individual,
int  status 
)

Sets subscription status.

Parameters:
individualindividuals to set.
statussubscription status (
See also:
subscribe_status).
Returns:
0 on success or -1 otherwise.
SSLOG_EXTERN void sslog_free_class ( class_t ont_class)

Free class structure.

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

Parameters:
ont_classclass structure.
SSLOG_EXTERN void sslog_free_data_property_value_struct ( prop_val_t prop_val)

Free property value struct.

It checks object or data property given and then free only data-property. Property is not freed. This function doesn't free value if property not set, in this case only structure (

See also:
prop_val_t) will be freed.
Parameters:
prop_valproperty value structure.
SSLOG_EXTERN void sslog_free_individual ( individual_t individual)

Free individual structure.

Parent class not free.

Parameters:
classclass structure.
SSLOG_EXTERN void sslog_free_property ( property_t property)

Free property structure.

Free all fields, subproperties are not freed, only the list structure and all nodes, data stay untouched.

Parameters:
propertyproperty for free.
SSLOG_EXTERN void sslog_free_value_struct ( 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 is not freed. This function doesn't free value if property not set, in this case only structure (

See also:
prop_val_t) will be freed.
Parameters:
prop_valproperty value structure.
SSLOG_EXTERN void sslog_free_value_struct_with_func ( prop_val_t prop_val,
void(*)(void *)  free_data_func 
)

Free property value struct.

Property is not freed.

Parameters:
prop_valproperty value structure.
free_data_funcfunction for free property value or NULL.
SSLOG_EXTERN int sslog_get_rtti_type ( const void *  entity)

Gets RTTI.

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