Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
KNI_4.3.0
lib
kinematics
roboop
newmat
include.h
Go to the documentation of this file.
1
6
7
#ifndef INCLUDE_LIB
8
#define INCLUDE_LIB
9
10
//#define use_namespace // define name spaces
11
12
//#define SETUP_C_SUBSCRIPTS // allow element access via A[i][j]
13
14
//#define OPT_COMPATIBLE // for use with opt++
15
16
// Activate just one of the following 3 statements
17
18
//#define SimulateExceptions // use simulated exceptions
19
#define UseExceptions // use C++ exceptions
20
//#define DisableExceptions // do not use exceptions
21
22
23
//#define TEMPS_DESTROYED_QUICKLY // for compilers that delete
24
// temporaries too quickly
25
26
//#define TEMPS_DESTROYED_QUICKLY_R // the same thing but applied
27
// to return from functions only
28
29
//#define DO_FREE_CHECK // check news and deletes balance
30
31
#define USING_DOUBLE // elements of type double
32
//#define USING_FLOAT // elements of type float
33
34
#define bool_LIB 0 // for compatibility with my older libraries
35
36
//#define ios_format_flags ios::fmtflags // for Gnu 3 and Intel for Linux
37
38
39
//#define _STANDARD_ // using standard library
40
41
//#define use_float_h // use float.h for precision data
42
43
44
//#define HAS_INT64 // if unsigned _int64 is recognised
45
// used by newran03
46
47
// comment out next line if Exception causes a problem
48
#define TypeDefException
49
50
//*********************** end of options set by user ********************
51
52
53
// for Gnu C++ version 3
54
#if defined __GNUG__ && __GNUG__ >= 3
55
#define _STANDARD_ // use standard library
56
#define ios_format_flags ios::fmtflags
57
#endif
58
59
// for Intel C++ for Linux
60
#if defined __ICC
61
#define _STANDARD_ // use standard library
62
#define ios_format_flags ios::fmtflags
63
#endif
64
65
// for Borland C++ 5.82 (Turbo C++ 2006)
66
#if defined __BCPLUSPLUS__ && __BCPLUSPLUS__ >= 0x0582
67
#define ios_format_flags ios::fmtflags
68
#endif
69
70
// for Microsoft Visual C++ 7 and above (and Intel simulating these)
71
#if defined _MSC_VER && _MSC_VER >= 1300
72
#define _STANDARD_ // use standard library
73
#endif
74
75
76
#ifdef _STANDARD_ // using standard library
77
#include <cstdlib>
78
#if defined _MSC_VER && _MSC_VER == 1200
79
#include <limits>
// for VC++6
80
#endif
81
#ifdef WANT_STREAM
82
#include <iostream>
83
#include <iomanip>
84
#endif
85
#ifdef WANT_MATH
86
#include <cmath>
87
#endif
88
#ifdef WANT_STRING
89
#include <cstring>
90
#endif
91
#ifdef WANT_TIME
92
#include <ctime>
93
#endif
94
#ifdef WANT_FSTREAM
95
#include <fstream>
96
#endif
97
using namespace
std
;
98
#else
99
100
#define DEFAULT_HEADER // use AT&T style header
101
// if no other compiler is recognised
102
103
#ifdef _MSC_VER // Microsoft
104
#include <stdlib.h>
105
106
// reactivate these statements to run under MSC version 7.0
107
// typedef int jmp_buf[9];
108
// extern "C"
109
// {
110
// int __cdecl setjmp(jmp_buf);
111
// void __cdecl longjmp(jmp_buf, int);
112
// }
113
114
#ifdef WANT_STREAM
115
#include <iostream.h>
116
#include <iomanip.h>
117
#endif
118
#ifdef WANT_MATH
119
#include <math.h>
120
#include <float.h>
121
#endif
122
#ifdef WANT_STRING
123
#include <string.h>
124
#endif
125
#ifdef WANT_TIME
126
#include <time.h>
127
#endif
128
#ifdef WANT_FSTREAM
129
#include <fstream.h>
130
#endif
131
#undef DEFAULT_HEADER
132
#endif
133
134
#ifdef __ZTC__ // Zortech
135
#include <stdlib.h>
136
#ifdef WANT_STREAM
137
#include <iostream.hpp>
138
#include <iomanip.hpp>
139
#define flush "" // not defined in iomanip?
140
#endif
141
#ifdef WANT_MATH
142
#include <math.h>
143
#include <float.h>
144
#endif
145
#ifdef WANT_STRING
146
#include <string.h>
147
#endif
148
#ifdef WANT_TIME
149
#include <time.h>
150
#endif
151
#ifdef WANT_FSTREAM
152
#include <fstream.h>
153
#endif
154
#undef DEFAULT_HEADER
155
#endif
156
157
#if defined __BCPLUSPLUS__ || defined __TURBOC__ // Borland or Turbo
158
#include <stdlib.h>
159
#ifdef WANT_STREAM
160
#include <iostream.h>
161
#include <iomanip.h>
162
#endif
163
#ifdef WANT_MATH
164
#include <math.h>
165
#include <float.h>
// Borland has both float and values
166
// but values.h returns +INF for
167
// MAXDOUBLE in BC5
168
#endif
169
#ifdef WANT_STRING
170
#include <string.h>
171
#endif
172
#ifdef WANT_TIME
173
#include <time.h>
174
#endif
175
#ifdef WANT_FSTREAM
176
#include <fstream.h>
177
#endif
178
#undef DEFAULT_HEADER
179
#endif
180
181
#ifdef __GNUG__ // Gnu C++
182
#include <stdlib.h>
183
#ifdef WANT_STREAM
184
#include <iostream.h>
185
#include <iomanip.h>
186
#endif
187
#ifdef WANT_MATH
188
#include <math.h>
189
#include <float.h>
190
#endif
191
#ifdef WANT_STRING
192
#include <string.h>
193
#endif
194
#ifdef WANT_TIME
195
#include <time.h>
196
#endif
197
#ifdef WANT_FSTREAM
198
#include <fstream.h>
199
#endif
200
#undef DEFAULT_HEADER
201
#endif
202
203
#ifdef __WATCOMC__ // Watcom C/C++
204
#include <stdlib.h>
205
#ifdef WANT_STREAM
206
#include <iostream.h>
207
#include <iomanip.h>
208
#endif
209
#ifdef WANT_MATH
210
#include <math.h>
211
#include <float.h>
212
#endif
213
#ifdef WANT_STRING
214
#include <string.h>
215
#endif
216
#ifdef WANT_TIME
217
#include <time.h>
218
#endif
219
#ifdef WANT_FSTREAM
220
#include <fstream.h>
221
#endif
222
#undef DEFAULT_HEADER
223
#endif
224
225
226
#ifdef macintosh // MPW C++ on the Mac
227
#include <stdlib.h>
228
#ifdef WANT_STREAM
229
#include <iostream.h>
230
#include <iomanip.h>
231
#endif
232
#ifdef WANT_MATH
233
#include <float.h>
234
#include <math.h>
235
#endif
236
#ifdef WANT_STRING
237
#include <string.h>
238
#endif
239
#ifdef WANT_TIME
240
#include <time.h>
241
#endif
242
#ifdef WANT_FSTREAM
243
#include <fstream.h>
244
#endif
245
#undef DEFAULT_HEADER
246
#endif
247
248
#ifdef use_float_h // use float.h for precision values
249
#include <stdlib.h>
250
#ifdef WANT_STREAM
251
#include <iostream.h>
252
#include <iomanip.h>
253
#endif
254
#ifdef WANT_MATH
255
#include <float.h>
256
#include <math.h>
257
#endif
258
#ifdef WANT_STRING
259
#include <string.h>
260
#endif
261
#ifdef WANT_TIME
262
#include <time.h>
263
#endif
264
#ifdef WANT_FSTREAM
265
#include <fstream.h>
266
#endif
267
#undef DEFAULT_HEADER
268
#endif
269
270
271
#ifdef DEFAULT_HEADER // for example AT&T
272
#define ATandT
273
#include <stdlib.h>
274
#ifdef WANT_STREAM
275
#include <iostream.h>
276
#include <iomanip.h>
277
#endif
278
#ifdef WANT_MATH
279
#include <math.h>
280
#define SystemV // use System V
281
#include <values.h>
282
#endif
283
#ifdef WANT_STRING
284
#include <string.h>
285
#endif
286
#ifdef WANT_TIME
287
#include <time.h>
288
#endif
289
#ifdef WANT_FSTREAM
290
#include <fstream.h>
291
#endif
292
#endif // DEFAULT_HEADER
293
294
#endif // _STANDARD_
295
296
#ifdef use_namespace
297
namespace
RBD_COMMON {
298
#endif
299
300
301
#ifdef USING_FLOAT // set precision type to float
302
typedef
float
Real
;
303
typedef
double
long_Real
;
304
#endif
305
306
#ifdef USING_DOUBLE // set precision type to double
307
typedef
double
Real
;
308
typedef
long
double
long_Real
;
309
#endif
310
311
312
// This is for (very old) compilers that do not have bool automatically defined
313
314
#ifndef bool_LIB
315
#define bool_LIB 0
316
317
class
bool
318
{
319
int
value;
320
public
:
321
bool(
const
int
b) { value = b ? 1 : 0; }
322
bool(
const
void
* b) { value = b ? 1 : 0; }
323
bool() {}
324
operator
int()
const
{
return
value; }
325
int
operator!()
const
{
return
!value; }
326
};
327
328
329
const
bool
true
= 1;
330
const
bool
false
= 0;
331
332
#endif
333
334
335
#ifdef use_namespace
336
}
337
#endif
338
339
340
#ifdef use_namespace
341
namespace
RBD_COMMON {}
342
namespace
RBD_LIBRARIES
// access all my libraries
343
{
344
using namespace
RBD_COMMON;
345
}
346
#endif
347
348
349
#endif
350
351
353
std
Real
double Real
Definition:
include.h:307
long_Real
long double long_Real
Definition:
include.h:308
kni
Author(s): Martin Günther
autogenerated on Fri Jun 7 2019 22:06:44