Internalfunctions - SmartSlog KP Library
|
Describe C structures for OWL entities, KP and SS. More...
#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... |
Macros | |
#define | SSLOG_EXTERN |
Typedefs | |
typedef enum action_type_enum | action_type |
Statses of triples changing. | |
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_SUBSCRIPTION, RTTI_SUBSCRIPTION_CHANGES, RTTI_SUBSCRIPTION_CALLBACK, RTTI_PATTERN, RTTI_PATTERN_CONDITION, RTTI_MAX_VALUE } |
Run-time type information. More... | |
enum | property_types { DATATYPEPROPERTY = 1, OBJECTPROPERTY = 2 } |
Types of properties. More... | |
enum | pattern_conditions_types { PATTERN_COND_NO, PATTERN_COND_E, PATTERN_COND_EL, PATTERN_COND_EA, PATTERN_COND_L, PATTERN_COND_A, PATTERN_COND_NE, PATTERN_COND_LINK, PATTERN_COND_STRSTR } |
Conditions for pattern. More... | |
enum | action_type_enum { ACTION_UPDATE, ACTION_REMOVE, ACTION_INSERT, ACTION_UNKNOWN } |
Statses of triples changing. More... | |
enum | subscribe_status { SBCR_STATUS_MIN, SBCR_STATUS_NO, SBCR_STATUS_SUBSCRIBED, SBCR_STATUS_UPDATING, SBCR_STATUS_MAX } |
Types of subscription process. More... |
Functions | |
SSLOG_EXTERN void | sslog_free_property (property_t *property) |
Free property structure. | |
SSLOG_EXTERN void | sslog_free_value_struct (prop_val_t *prop_val) |
Free property value struct. | |
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_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 prop_val_t * | sslog_new_value_struct (property_t *prop, const void *data) |
Create new property value 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. |
Describe C structures for OWL entities, KP and SS.
Alexandr 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.
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
Describe 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.
#define SSLOG_EXTERN |
typedef enum action_type_enum action_type |
Statses of triples changing.
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.
enum action_type_enum |
Conditions for pattern.
enum property_types |
enum rtti_types |
Run-time type information.
RTTI_MIN_VALUE |
Use for checking min value of rtti field. |
RTTI_INDIVIDUAL |
Individual type. |
RTTI_CLASS |
Class type. |
RTTI_PROPERTY |
Property type. |
RTTI_SUBSCRIPTION |
Subscription type. |
RTTI_SUBSCRIPTION_CHANGES |
Subscription changes type (subscription_changes_data_s). |
RTTI_SUBSCRIPTION_CALLBACK |
Subscription's callback type. |
RTTI_PATTERN |
Pattern type. |
RTTI_PATTERN_CONDITION |
Pattern condition type. |
RTTI_MAX_VALUE |
Use for checking max value of rtti field. |
enum subscribe_status |
int get_sbcr_status | ( | individual_t * | individual | ) |
Gets subscription status of individuals.
individual | individuals to check. |
int set_sbcr_status | ( | individual_t * | individual, |
int | status | ||
) |
Sets subscription status.
individual | individuals to set. |
status | subscription status ( |
SSLOG_EXTERN void sslog_free_class | ( | class_t * | ont_class | ) |
Free class structure.
Properties, instances and superclasses not freed, only list struct.
ont_class | class 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 (
prop_val | property value structure. |
SSLOG_EXTERN void sslog_free_individual | ( | individual_t * | individual | ) |
Free individual structure.
Parent class not free.
class | class 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.
property | property 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 (
prop_val | property 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.
prop_val | property value structure. |
free_data_func | function for free property value or NULL. |
SSLOG_EXTERN int sslog_get_rtti_type | ( | const void * | entity | ) |
Gets RTTI.
entity | some entity, for example: individual, class or property. |
SSLOG_EXTERN prop_val_t* sslog_new_value_struct | ( | property_t * | prop, |
const void * | data | ||
) |
Create new property value structure.
This function copy only value for data-property (i.e. char*), if property is object then value is pointer to given value (i.e. individual).
prop | property for value. |
data | data for value of property. |