BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
COMMON
COMMON/global.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_COMMON_GLOBAL_H
6
#define BALL_COMMON_GLOBAL_H
7
8
#ifndef BALL_CONFIG_CONFIG_H
9
# include <BALL/CONFIG/config.h>
10
#endif
11
12
#include <limits>
13
#include <time.h>
14
15
#ifdef BALL_HAS_BASETSD_H
16
# include <basetsd.h>
17
#endif
18
19
// If possible use the ISO C99-compliant header stdint.h
20
// to define the portable integer types.
21
#ifdef BALL_HAS_STDINT_H
22
# include <stdint.h>
23
#endif
24
25
#ifdef BALL_COMPILER_MSVC
26
# define BALL_HIDE
27
# ifdef BALL_BUILD_DLL
28
# define BALL_EXPORT __declspec(dllexport)
29
# define BALL_EXTERN_VARIABLE __declspec(dllexport) extern
30
# else
31
# define BALL_EXPORT __declspec(dllimport)
32
# define BALL_EXTERN_VARIABLE __declspec(dllimport) extern
33
# endif
34
# ifdef BALL_VIEW_BUILD_DLL
35
# define BALL_VIEW_EXPORT __declspec(dllexport)
36
# else
37
# define BALL_VIEW_EXPORT __declspec(dllimport)
38
# endif
39
#elif defined(BALL_COMPILER_GXX) && (BALL_COMPILER_VERSION_MAJOR > 4 || (BALL_COMPILER_VERSION_MAJOR == 4 && BALL_COMPILER_VERSION_MINOR >= 3))
40
# define BALL_EXPORT __attribute__((visibility ("default")))
41
# define BALL_HIDE __attribute__((visibility ("hidden")))
42
# define BALL_VIEW_EXPORT __attribute__((visibility ("default")))
43
# define BALL_EXTERN_VARIABLE extern __attribute__((visibility ("default")))
44
#else
45
# define BALL_EXPORT
46
# define BALL_HIDE
47
# define BALL_VIEW_EXPORT
48
# define BALL_EXTERN_VARIABLE extern
49
#endif
50
51
//This declares a BALL_DEPRECATED macro that can be used to mark deprecated api
52
//It is essentially copied from Qt 4.4.1 but simplified, thus there might be
53
//some cases where it does not work as expected, yet.
54
#if defined(BALL_COMPILER_MSVC) && (_MSC_VER >= 1300)
55
#define BALL_DEPRECATED __declspec(deprecated)
56
#elif defined(BALL_COMPILER_GXX) && (BALL_COMPILER_VERSION_MAJOR - 0 > 3 || (BALL_COMPILER_VERSION_MAJOR - 0 == 3 && BALL_COMPILER_VERSION_MINOR - 0 >= 2))
57
#define BALL_DEPRECATED __attribute__((deprecated))
58
#else
59
#define BALL_DEPRECATED
60
#endif
61
62
namespace
BALL
63
{
64
65
typedef
int (*
ComparatorType
)(
const
void
*,
const
void
*);
66
74
81
typedef
BALL_INDEX_TYPE
Distance
;
82
91
typedef
BALL_SIZE_TYPE
Handle
;
92
100
typedef
BALL_INDEX_TYPE
Index
;
101
109
typedef
BALL_SIZE_TYPE
Size
;
110
118
typedef
time_t
Time
;
119
126
typedef
BALL_SIZE_TYPE
HashIndex
;
127
135
typedef
BALL_SIZE_TYPE
Position
;
136
143
typedef
float
Real
;
144
151
typedef
double
DoubleReal
;
152
160
typedef
BALL_SIZE_TYPE
Property
;
161
168
typedef
BALL_INDEX_TYPE
ErrorCode
;
169
170
178
typedef
unsigned
char
Byte
;
179
187
typedef
BALL_ULONG64_TYPE
LongSize
;
188
196
typedef
BALL_LONG64_TYPE
LongIndex
;
197
202
typedef
BALL_POINTERSIZEUINT_TYPE
PointerSizeUInt
;
203
205
206
enum
ASCII
207
{
208
ASCII__BACKSPACE
=
'\b'
,
209
ASCII__BELL
=
'\a'
,
210
ASCII__CARRIAGE_RETURN
=
'\r'
,
211
ASCII__HORIZONTAL_TAB
=
'\t'
,
212
ASCII__NEWLINE
=
'\n'
,
213
ASCII__RETURN
=
ASCII__NEWLINE
,
214
ASCII__SPACE
=
' '
,
215
ASCII__TAB
=
ASCII__HORIZONTAL_TAB
,
216
ASCII__VERTICAL_TAB
=
'\v'
,
217
218
ASCII__COLON
=
':'
,
219
ASCII__COMMA
=
','
,
220
ASCII__EXCLAMATION_MARK
=
'!'
,
221
ASCII__POINT
=
'.'
,
222
ASCII__QUESTION_MARK
=
'?'
,
223
ASCII__SEMICOLON
=
';'
224
};
225
226
static
const
Distance
INVALID_DISTANCE
=
std::numeric_limits<Distance>::max
();
227
static
const
Distance
DISTANCE_MIN
= (
std::numeric_limits<Distance>::min
() + 1);
228
static
const
Distance
DISTANCE_MAX
=
std::numeric_limits<Distance>::max
();
229
230
static
const
Handle
INVALID_HANDLE
=
std::numeric_limits<Handle>::max
();
231
static
const
Handle
HANDLE_MIN
= 0 ;
232
static
const
Handle
HANDLE_MAX
=
std::numeric_limits<Handle>::max
() - 1;
233
234
static
const
Index
INVALID_INDEX
= -1;
235
static
const
Index
INDEX_MIN
= 0;
236
static
const
Index
INDEX_MAX
=
std::numeric_limits<Index>::max
();
237
238
static
const
Position
INVALID_POSITION
=
std::numeric_limits<Position>::max
();
239
static
const
Position
POSITION_MIN
= 0;
240
static
const
Position
POSITION_MAX
=
std::numeric_limits<Position>::max
() - 1;
241
242
# undef SIZE_MAX
243
static
const
Size
INVALID_SIZE
=
std::numeric_limits<Size>::max
();
244
static
const
Size
SIZE_MIN
= 0;
245
static
const
Size
SIZE_MAX
=
std::numeric_limits<Size>::max
() - 1;
246
247
248
}
249
250
#endif // BALL_COMMON_GLOBAL_H
Generated by
1.8.3.1