Internalfunctions - SmartSlog KP Library
Main Page
Modules
Data Structures
Files
File List
Globals
structures.h
Go to the documentation of this file.
1
35
#include <stdio.h>
36
#include <stdlib.h>
37
#include "utils/kp_bool.h"
38
#include "utils/list.h"
39
40
#ifndef _STRUCTURES_H
41
#define _STRUCTURES_H
42
43
#if defined(WIN32) || defined(WINCE) || defined(SMARTSLOG_WIN_EXPORTS)
44
#define SSLOG_EXTERN __declspec(dllexport)
45
#else
46
#define SSLOG_EXTERN
47
#endif
48
49
#ifdef __cplusplus
50
extern
"C"
{
51
#endif
52
53
/******************************************************************************/
54
/******************************** Enums list **********************************/
56
60
enum
rtti_types
{
61
RTTI_MIN_VALUE
= 0,
62
RTTI_INDIVIDUAL
= 1,
63
RTTI_CLASS
= 2,
64
RTTI_PROPERTY
= 3,
65
RTTI_SUBSCRIPTION
,
66
RTTI_SUBSCRIPTION_CHANGES
,
67
RTTI_SUBSCRIPTION_CALLBACK
,
68
RTTI_PATTERN
,
69
RTTI_PATTERN_CONDITION
,
70
RTTI_MAX_VALUE
71
};
72
73
77
enum
property_types
{
78
DATATYPEPROPERTY
= 1,
79
OBJECTPROPERTY
= 2
80
};
81
82
86
enum
pattern_conditions_types
{
87
PATTERN_COND_NO
,
88
PATTERN_COND_E
,
89
PATTERN_COND_EL
,
90
PATTERN_COND_EA
,
91
PATTERN_COND_L
,
92
PATTERN_COND_A
,
93
PATTERN_COND_NE
,
95
PATTERN_COND_LINK
,
97
PATTERN_COND_STRSTR
98
};
99
101
typedef
enum
action_type_enum
{
102
ACTION_UPDATE
,
103
ACTION_REMOVE
,
104
ACTION_INSERT
,
105
ACTION_UNKNOWN
106
}
action_type
;
107
109
111
115
enum
subscribe_status
{
116
SBCR_STATUS_MIN
,
117
SBCR_STATUS_NO
,
118
SBCR_STATUS_SUBSCRIBED
,
119
SBCR_STATUS_UPDATING
,
120
SBCR_STATUS_MAX
121
};
122
124
125
/******************************************************************************/
126
127
128
129
/******************************************************************************/
130
/****************************** Structures list *******************************/
132
136
typedef
struct
property_s
{
137
int
rtti
;
138
int
type
;
139
char
*
name
;
140
char
*
domain
;
141
char
*
about
;
142
list_t *
subpropertyof
;
143
list_t *
oneof
;
144
int
mincardinality
;
145
int
maxcardinality
;
146
}
property_t
;
147
148
154
typedef
struct
prop_val_s
{
155
property_t
*
property
;
156
void
*
prop_value
;
157
}
prop_val_t
;
158
159
163
typedef
struct
class_s
{
164
int
rtti
;
165
char
*
classtype
;
166
list_t *
superclasses
;
167
list_t *
oneof
;
168
list_t *
properties
;
169
list_t *
instances
;
170
}
class_t
;
171
172
176
typedef
struct
individual_s
{
177
int
rtti
;
178
char
*
uuid
;
179
char
*
classtype
;
180
list_t *
properties
;
181
const
class_t
*
parent_class
;
182
int
subscribe_status
;
183
}
individual_t
;
184
185
187
/******************************************************************************/
188
189
190
191
/******************************************************************************/
192
/****************************** Functions list ********************************/
194
195
SSLOG_EXTERN
void
sslog_free_property
(
property_t
*property);
196
SSLOG_EXTERN
void
sslog_free_value_struct
(
prop_val_t
*prop_val);
197
SSLOG_EXTERN
void
sslog_free_value_struct_with_func
(
prop_val_t
*prop_val,
void
(*free_data_func)(
void
*));
198
SSLOG_EXTERN
void
sslog_free_data_property_value_struct
(
prop_val_t
*prop_val);
199
SSLOG_EXTERN
void
sslog_free_class
(
class_t
*ont_class);
200
SSLOG_EXTERN
void
sslog_free_individual
(
individual_t
*individual);
201
202
SSLOG_EXTERN
prop_val_t
*
sslog_new_value_struct
(
property_t
*prop,
const
void
*data);
203
204
SSLOG_EXTERN
int
sslog_get_rtti_type
(
const
void
* entity);
205
207
208
210
211
int
get_sbcr_status
(
individual_t
*individual);
212
int
set_sbcr_status
(
individual_t
*individual,
int
status);
213
215
/******************************************************************************/
216
217
#ifdef __cplusplus
218
}
219
#endif
220
221
#endif
/* _STRUCTURES_H */
Generated on Mon Dec 17 2012 16:22:49 for Internalfunctions - SmartSlog KP Library by
1.8.1.1