forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsdai.h
More file actions
266 lines (207 loc) · 8.58 KB
/
sdai.h
File metadata and controls
266 lines (207 loc) · 8.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
#ifndef P23SDAI_H
#define P23SDAI_H
/*
* NIST STEP Core Class Library
* clstepcore/sdai.h
* April 1997
* David Sauder
* KC Morris
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
* This file is included to support the proposed SDAI/C++ Language Binding
* specified in Annex D of STEP Part 22.
* This file specifies the appropriate naming conventions and NULL
* values for the EXPRESS base types.
*/
#include "config.h"
#include <sc_export.h>
extern const char * SCLversion;
#include <ctype.h>
#include <string>
#include "clstepcore/dictdefs.h"
#include "clstepcore/baseType.h"
#include "clutils/Str.h"
#include "clutils/errordesc.h"
typedef std::string Express_id;
class TypeDescriptor;
class EntityDescriptor;
class SelectTypeDescriptor;
class InstMgrBase;
#include "clstepcore/STEPattributeList.h"
#include "clstepcore/STEPinvAttrList.h"
class STEPattributeList;
class STEPattribute;
#ifndef BINARY_DELIM
#define BINARY_DELIM '\"'
#endif
// STRING
#define S_STRING_NULL ""
typedef long SDAI_Integer;
typedef short SDAI_Short;
typedef unsigned short SDAI_UShort;
typedef unsigned long SDAI_ULong;
typedef double SDAI_Real;
// C++ from values.h DAS PORT
extern SC_CORE_EXPORT const SDAI_Integer SDAI_INT_NULL;
extern SC_CORE_EXPORT const SDAI_Real SDAI_REAL_NULL;
// arbitrary choice by me for number DAS
extern SC_CORE_EXPORT const SDAI_Real SDAI_NUMBER_NULL;
enum SDAI_Access_type {
SDAI_sdaiRO,
SDAI_sdaiRW,
SDAI_Access_type_unset
};
enum SDAI_Commit_mode {
SDAI_sdaiCOMMIT,
SDAI_sdaiABORT
} ;
enum SDAI_AttrFlag {
SDAI_sdaiSET,
SDAI_sdaiUNSET
} ;
enum SDAI_ImplementationClass {
SDAI_sdaiCLASS1,
SDAI_sdaiCLASS2,
SDAI_sdaiCLASS3,
SDAI_sdaiCLASS4,
SDAI_sdaiCLASS5
}; // conflict with part 22 EXPRESS:
enum SDAI_Error_id {
//
// error codes taken from 10303-23, Jan 28, 1997.
// ISO TC184/SC4/WG11 N 004
//
SDAI_sdaiNO_ERR = 0, // No error
SDAI_sdaiSS_OPN = 10, // Session open
SDAI_sdaiSS_NAVL = 20, // Session not available
SDAI_sdaiSS_NOPN = 30, // Session is not open
SDAI_sdaiRP_NEXS = 40, // Repository does not exist
SDAI_sdaiRP_NAVL = 50, // Repository not available
SDAI_sdaiRP_OPN = 60, // Repository already opened
SDAI_sdaiRP_NOPN = 70, // Repository is not open
SDAI_sdaiTR_EAB = 80, // Transaction ended abnormally so it no longer exists
SDAI_sdaiTR_EXS = 90, // Transaction exists
SDAI_sdaiTR_NAVL = 100, // Transaction not available
SDAI_sdaiTR_RW = 110, // Transaction read-write
SDAI_sdaiTR_NRW = 120, // Transaction not read-write
SDAI_sdaiTR_NEXS = 130, // Transaction does not exist
SDAI_sdaiMO_NDEQ = 140, // SDAI-model not domain-equivalent
SDAI_sdaiMO_NEXS = 150, // SDAI-model does not exist
SDAI_sdaiMO_NVLD = 160, // SDAI-model invalid
SDAI_sdaiMO_DUP = 170, // SDAI-model duplicate
SDAI_sdaiMX_NRW = 180, // SDAI-model access not read-write
SDAI_sdaiMX_NDEF = 190, // SDAI-model access is not defined
SDAI_sdaiMX_RW = 200, // SDAI-model access read-write
SDAI_sdaiMX_RO = 210, // SDAI-model access read-only
SDAI_sdaiSD_NDEF = 220, // Schema definition is not defined
SDAI_sdaiED_NDEF = 230, // Entity definition not defined
SDAI_sdaiED_NDEQ = 240, // Entity definition not domain equivalent
SDAI_sdaiED_NVLD = 250, // Entity definition invalid
// SDAI_sdaiED_NAVL = 250, // Entity definition not available
SDAI_sdaiRU_NDEF = 260, // Rule not defined
SDAI_sdaiEX_NSUP = 270, // Expression evaluation not supported
SDAI_sdaiAT_NVLD = 280, // Attribute invalid
SDAI_sdaiAT_NDEF = 290, // Attribute not defined
SDAI_sdaiSI_DUP = 300, // Schema instance duplicate
SDAI_sdaiSI_NEXS = 310, // Schema instance does not exist
SDAI_sdaiEI_NEXS = 320, // Entity instance does not exist
SDAI_sdaiEI_NAVL = 330, // Entity instance not available
SDAI_sdaiEI_NVLD = 340, // Entity instance invalid
SDAI_sdaiEI_NEXP = 350, // Entity instance not exported
SDAI_sdaiSC_NEXS = 360, // Scope does not exist
SDAI_sdaiSC_EXS = 370, // Scope exists
SDAI_sdaiAI_NEXS = 380, // Aggregate instance does not exist
SDAI_sdaiAI_NVLD = 390, // Aggregate instance invalid
SDAI_sdaiAI_NSET = 400, // Aggregate instance is empty
SDAI_sdaiVA_NVLD = 410, // Value invalid
SDAI_sdaiVA_NEXS = 420, // Value does not exist
SDAI_sdaiVA_NSET = 430, // Value not set
SDAI_sdaiVT_NVLD = 440, // Value type invalid
SDAI_sdaiIR_NEXS = 450, // Iterator does not exist
SDAI_sdaiIR_NSET = 460, // Current member is not defined
SDAI_sdaiIX_NVLD = 470, // Index invalid
SDAI_sdaiER_NSET = 480, // Event recording not set
SDAI_sdaiOP_NVLD = 490, // Operator invalid
SDAI_sdaiFN_NAVL = 500, // Function not available
SDAI_sdaiSY_ERR = 1000 // Underlying system error
};
typedef char * SDAI_Time_stamp;
typedef char * SDAI_Entity_name;
typedef char * SDAI_Schema_name;
#include "cldai/sdaiString.h"
#include "cldai/sdaiBinary.h"
// define Object which I am calling sdaiObject for now - DAS
#include "cldai/sdaiObject.h"
/******************************************************************************
ENUMERATION
These types do not use the interface specified.
The interface used is to enumerated values. The enumerations are
mapped in the following way:
* enumeration-item-from-schema ==> enumeration item in c++ enum clause
* all enumeration items in c++ enum are in upper case
* the value ENUM_NULL is used to represent NULL for all enumerated types
*****************************************************************************/
#include "cldai/sdaiEnum.h"
/******************************************************************************
BOOLEAN and LOGICAL
Logical are implemented as an enumeration in sdaiEnum.h:
Boolean are implemented as an enumeration in sdaiEnum.h:
******************************************************************************/
// ***note*** this file needs classes from sdaiEnum.h
// define DAObjectID and classes PID, PID_DA, PID_SDAI, DAObject, DAObject_SDAI
#include "cldai/sdaiDaObject.h"
#include "clstepcore/sdaiApplication_instance.h"
#include "cldai/sdaiApplication_instance_set.h"
/******************************************************************************
SELECT
Selects are represented as subclasses of the SDAI_Select class in
sdaiSelect.h
******************************************************************************/
#include "clstepcore/sdaiSelect.h"
class SDAI_Model_contents;
typedef SDAI_Model_contents * SDAI_Model_contents_ptr;
typedef SDAI_Model_contents_ptr SDAI_Model_contents_var;
#include "cldai/sdaiModel_contents_list.h"
#include "cldai/sdaiSession_instance.h"
#include "cldai/sdaiEntity_extent.h"
#include "cldai/sdaiEntity_extent_set.h"
#include "cldai/sdaiModel_contents.h"
// ENTITY
extern SC_CORE_EXPORT SDAI_Application_instance NilSTEPentity;
//FIXME why 3 of these? remove 2?
//in libexpress, ENTITY_NULL is also used but refers to something different
#define ENTITY_NULL &NilSTEPentity
#define NULL_ENTITY &NilSTEPentity
#define S_ENTITY_NULL &NilSTEPentity
typedef SDAI_Application_instance STEPentity;
typedef SDAI_Application_instance * STEPentity_ptr;
typedef STEPentity_ptr STEPentity_var;
typedef SDAI_Application_instance * STEPentityPtr;
typedef SDAI_Application_instance * STEPentityH;
extern SC_CORE_EXPORT SDAI_Application_instance *
ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList,
InstMgrBase * instances, int addFileId );
#define SdaiInteger SDAI_Integer
#define SdaiReal SDAI_Real
#define STEPenumeration SDAI_Enum
#define SdaiSelect SDAI_Select
#define SdaiString SDAI_String
#define SdaiBinary SDAI_Binary
#define S_INT_NULL SDAI_INT_NULL
#define S_REAL_NULL SDAI_REAL_NULL
#define S_NUMBER_NULL SDAI_NUMBER_NULL
/******************************************************************************
AGGREGATE TYPES
Aggregate types are accessed generically. (There are not separate
classes for the different types of aggregates.) Aggregates are
implemented through the STEPaggregate class.
******************************************************************************/
inline SDAI_BOOLEAN * create_BOOLEAN() {
return new SDAI_BOOLEAN ;
}
inline SDAI_LOGICAL * create_LOGICAL() {
return new SDAI_LOGICAL ;
}
// below is outdated
typedef SDAI_Select * SdaiSelectH;
#endif