ALib C++ Library
Library Version:
2312 R0
Documentation generated by
home
dev
A-Worx
ALib
src
alib
lib
modules.hpp
Go to the documentation of this file.
1
/** ************************************************************************************************
2
* \file
3
* This header file is part of the \aliblong.
4
*
5
* \emoji :copyright: 2013-2023 A-Worx GmbH, Germany.
6
* Published under \ref mainpage_license "Boost Software License".
7
*
8
* This header does neither belong to a fileset, nor to a module of \alib, but is
9
* included in any \alibdist. Its purpose is to identify given \ref GrpALibPreproSymbols
10
* related to module selection and enable corresponding symbols (that may be not given) of
11
* dependent modules.
12
*
13
* \note
14
* This header is not shown in inclusion graphs of this documentation, as it is always
15
* included directly or indirectly.
16
**************************************************************************************************/
17
#ifndef HPP_ALIB_MODULES
18
#define HPP_ALIB_MODULES 1
19
20
#define ALIB_VERSION 2312
21
#define ALIB_REVISION 0
22
23
#if !defined(ALIB_DOX)
24
25
// #################################################################################################
26
// No module selection symbol given but threads? -> choose ALL
27
// #################################################################################################
28
#if !defined( ALIB_ALOX ) \
29
&& !defined( ALIB_BITBUFFER ) \
30
&& !defined( ALIB_BOXING ) \
31
&& !defined( ALIB_CHARACTERS ) \
32
&& !defined( ALIB_CLI ) \
33
&& !defined( ALIB_CONFIGURATION) \
34
&& !defined( ALIB_ENUMS ) \
35
&& !defined( ALIB_EXPRESSIONS ) \
36
&& !defined( ALIB_MONOMEM ) \
37
&& !defined( ALIB_RESOURCES ) \
38
&& !defined( ALIB_RESULTS ) \
39
&& !defined( ALIB_SINGLETONS ) \
40
&& !defined( ALIB_STRINGS ) \
41
&& !defined( ALIB_SYSTEM ) \
42
&& !defined( ALIB_TEXT ) \
43
&& !defined( ALIB_TIME )
44
# define ALIB_ALOX 1
45
# define ALIB_EXPRESSIONS 1
46
# define ALIB_CLI 1
47
# define ALIB_THREADS 1
48
# define ALIB_BITBUFFER 1
49
#endif
50
51
#if !defined(ALIB_ALOX )
52
# define ALIB_ALOX 0
53
#endif
54
#if !defined(ALIB_BITBUFFER )
55
# define ALIB_BITBUFFER 0
56
#endif
57
#if !defined(ALIB_BOXING )
58
# define ALIB_BOXING 0
59
#endif
60
#if !defined(ALIB_CLI )
61
# define ALIB_CLI 0
62
#endif
63
#if !defined(ALIB_CHARACTERS )
64
# define ALIB_CHARACTERS 0
65
#endif
66
#if !defined(ALIB_CONFIGURATION)
67
# define ALIB_CONFIGURATION 0
68
#endif
69
#if !defined(ALIB_ENUMS )
70
# define ALIB_ENUMS 0
71
#endif
72
#if !defined(ALIB_EXPRESSIONS )
73
# define ALIB_EXPRESSIONS 0
74
#endif
75
#if !defined(ALIB_MONOMEM )
76
# define ALIB_MONOMEM 0
77
#endif
78
#if !defined(ALIB_RESOURCES )
79
# define ALIB_RESOURCES 0
80
#endif
81
#if !defined(ALIB_RESULTS )
82
# define ALIB_RESULTS 0
83
#endif
84
#if !defined(ALIB_SINGLETONS )
85
# define ALIB_SINGLETONS 0
86
#endif
87
#if !defined(ALIB_STRINGS )
88
# define ALIB_STRINGS 0
89
#endif
90
#if !defined(ALIB_SYSTEM )
91
# define ALIB_SYSTEM 0
92
#endif
93
#if !defined(ALIB_TEXT )
94
# define ALIB_TEXT 0
95
#endif
96
#if !defined(ALIB_TIME )
97
# define ALIB_TIME 0
98
#endif
99
#if !defined( ALIB_THREADS )
100
# define ALIB_THREADS 0
101
#endif
102
103
104
// #################################################################################################
105
// Resolve module dependencies
106
// #################################################################################################
107
#if ALIB_EXPRESSIONS
108
# undef ALIB_RESULTS
109
# define ALIB_RESULTS 1
110
#endif
111
#if ALIB_ALOX
112
# undef ALIB_CONFIGURATION
113
# define ALIB_CONFIGURATION 1
114
#endif
115
#if ALIB_CONFIGURATION
116
# undef ALIB_SYSTEM
117
# define ALIB_SYSTEM 1
118
#endif
119
#if ALIB_SYSTEM
120
# undef ALIB_RESULTS
121
# define ALIB_RESULTS 1
122
# undef ALIB_TIME
123
# define ALIB_TIME 1
124
#endif
125
#if ALIB_CLI
126
# undef ALIB_RESULTS
127
# define ALIB_RESULTS 1
128
#endif
129
#if ALIB_RESULTS
130
# undef ALIB_TEXT
131
# define ALIB_TEXT 1
132
#endif
133
#if ALIB_TEXT
134
# undef ALIB_RESULTS
135
# define ALIB_RESULTS 1
136
# undef ALIB_STRINGS
137
# define ALIB_STRINGS 1
138
# undef ALIB_BOXING
139
# define ALIB_BOXING 1
140
# undef ALIB_RESOURCES
141
# define ALIB_RESOURCES 1
142
# undef ALIB_ENUMS
143
# define ALIB_ENUMS 1
144
#endif
145
#if ALIB_RESOURCES
146
# undef ALIB_STRINGS
147
# define ALIB_STRINGS 1
148
# undef ALIB_MONOMEM
149
# define ALIB_MONOMEM 1
150
#endif
151
#if ALIB_BITBUFFER
152
# undef ALIB_MONOMEM
153
# define ALIB_MONOMEM 1
154
# undef ALIB_ENUMS
155
# define ALIB_ENUMS 1
156
#endif
157
#if ALIB_ENUMS
158
# undef ALIB_STRINGS
159
# define ALIB_STRINGS 1
160
# undef ALIB_SINGLETONS
161
# define ALIB_SINGLETONS 1
162
#endif
163
#if ALIB_THREADS
164
# undef ALIB_STRINGS
165
# define ALIB_STRINGS 1
166
#endif
167
#if ALIB_STRINGS
168
# undef ALIB_CHARACTERS
169
# define ALIB_CHARACTERS 1
170
#endif
171
#if ALIB_BOXING
172
# undef ALIB_SINGLETONS
173
# define ALIB_SINGLETONS 1
174
# undef ALIB_CHARACTERS
175
# define ALIB_CHARACTERS 1
176
#endif
177
178
// #################################################################################################
179
// Resolve file-set dependencies
180
// #################################################################################################
181
#if defined( ALIB_FILESET_OWNER ) \
182
|| defined( ALIB_FILESET_COMMON_ENUMS ) \
183
|| defined( ALIB_FILESET_MODULES ) \
184
|| defined( ALIB_FILESET_LISTS ) \
185
|| defined( ALIB_FILESET_PLUGINS )
186
# error "ALib preprocessor symbols for fileset selection (ALIB_FILESET_XYZ) may not be " \
187
"defined from outside (passed to the compiler)."
188
#endif
189
190
#define ALIB_FILESET_OWNER ( ALIB_THREADS \
191
| ALIB_TEXT )
192
193
#define ALIB_FILESET_COMMON_ENUMS ( ALIB_CHARACTERS \
194
| ALIB_MONOMEM \
195
| ALIB_TIME \
196
| ALIB_BOXING )
197
198
#define ALIB_FILESET_MODULES ( ALIB_TEXT )
199
200
#define ALIB_FILESET_LISTS ( ALIB_MONOMEM )
201
202
#define ALIB_FILESET_PLUGINS ( ALIB_CONFIGURATION \
203
| ALIB_EXPRESSIONS )
204
// if defined(ALIB_DOX)
205
#else
206
207
#define ALIB_ALOX 1
208
#define ALIB_BITBUFFER 1
209
#define ALIB_BOXING 1
210
#define ALIB_CHARACTERS 1
211
#define ALIB_CLI 1
212
#define ALIB_CONFIGURATION 1
213
#define ALIB_ENUMS 1
214
#define ALIB_EXPRESSIONS 1
215
#define ALIB_FILESET_COMMON_ENUMS 1
216
#define ALIB_FILESET_LISTS 1
217
#define ALIB_FILESET_MODULES 1
218
#define ALIB_FILESET_OWNER 1
219
#define ALIB_FILESET_PLUGINS 1
220
#define ALIB_MONOMEM 1
221
#define ALIB_RESOURCES 1
222
#define ALIB_RESULTS 1
223
#define ALIB_SINGLETONS 1
224
#define ALIB_STRINGS 1
225
#define ALIB_SYSTEM 1
226
#define ALIB_TEXT 1
227
#define ALIB_THREADS 1
228
#define ALIB_TIME 1
229
230
#endif
//!defined(ALIB_DOX)
231
232
// #################################################################################################
233
// Macros for checking availability of modules and filesets
234
// #################################################################################################
235
#define ALIB_DOCUMENTATION_URL "https://alib.dev/"
236
237
#define ALIB_ASSERT_MODULE(modulename) \
238
static_assert( ALIB_ ## modulename, \
239
"This module is not included in the ALib distribution/built. " \
240
"See " ALIB_DOCUMENTATION_URL "alib_manual.html for more information" ); \
241
242
#define ALIB_ASSERT_FILESET(filesetname) \
243
static_assert( ALIB_FILESET_ ## filesetname, \
244
"This file is not included in the ALib distribution/built. " \
245
"See " ALIB_DOCUMENTATION_URL "alib_manual.html for more information" ); \
246
247
248
// #################################################################################################
249
// Macros to sect code (without using #if/#endif)
250
// #################################################################################################
251
#if ALIB_ALOX
252
# define ALIB_IF_ALOX(...) __VA_ARGS__
253
# define ALIB_IFN_ALOX(...)
254
#else
255
# define ALIB_IF_ALOX(...)
256
# define ALIB_IFN_ALOX(...) __VA_ARGS__
257
#endif
258
259
#if ALIB_BOXING
260
# define ALIB_IF_BOXING(...) __VA_ARGS__
261
# define ALIB_IFN_BOXING(...)
262
#else
263
# define ALIB_IF_BOXING(...)
264
# define ALIB_IFN_BOXING(...) __VA_ARGS__
265
#endif
266
267
#if ALIB_CHARACTERS
268
# define ALIB_IF_CHARACTERS(...) __VA_ARGS__
269
# define ALIB_IFN_CHARACTERS(...)
270
#else
271
# define ALIB_IF_CHARACTERS(...)
272
# define ALIB_IFN_CHARACTERS(...) __VA_ARGS__
273
#endif
274
275
#if ALIB_CLI
276
# define ALIB_IF_CLI(...) __VA_ARGS__
277
# define ALIB_IFN_CLI(...)
278
#else
279
# define ALIB_IF_CLI(...)
280
# define ALIB_IFN_CLI(...) __VA_ARGS__
281
#endif
282
283
#if ALIB_CONFIGURATION
284
# define ALIB_IF_CONFIGURATION(...) __VA_ARGS__
285
# define ALIB_IFN_CONFIGURATION(...)
286
#else
287
# define ALIB_IF_CONFIGURATION(...)
288
# define ALIB_IFN_CONFIGURATION(...) __VA_ARGS__
289
#endif
290
291
#if ALIB_ENUMS
292
# define ALIB_IF_ENUMS(...) __VA_ARGS__
293
# define ALIB_IFN_ENUMS(...)
294
#else
295
# define ALIB_IF_ENUMS(...)
296
# define ALIB_IFN_ENUMS(...) __VA_ARGS__
297
#endif
298
299
#if ALIB_EXPRESSIONS
300
# define ALIB_IF_EXPRESSIONS(...) __VA_ARGS__
301
# define ALIB_IFN_EXPRESSIONS(...)
302
#else
303
# define ALIB_IF_EXPRESSIONS(...)
304
# define ALIB_IFN_EXPRESSIONS(...) __VA_ARGS__
305
#endif
306
307
#if ALIB_MONOMEM
308
# define ALIB_IF_MONOMEM(...) __VA_ARGS__
309
# define ALIB_IFN_MONOMEM(...)
310
#else
311
# define ALIB_IF_MONOMEM(...)
312
# define ALIB_IFN_MONOMEM(...) __VA_ARGS__
313
#endif
314
315
#if ALIB_RESULTS
316
# define ALIB_IF_RESULTS(...) __VA_ARGS__
317
# define ALIB_IFN_RESULTS(...)
318
#else
319
# define ALIB_IF_RESULTS(...)
320
# define ALIB_IFN_RESULTS(...) __VA_ARGS__
321
#endif
322
323
#if ALIB_RESOURCES
324
# define ALIB_IF_RESOURCES(...) __VA_ARGS__
325
# define ALIB_IFN_RESOURCES(...)
326
#else
327
# define ALIB_IF_RESOURCES(...)
328
# define ALIB_IFN_RESOURCES(...) __VA_ARGS__
329
#endif
330
331
#if ALIB_SINGLETONS
332
# define ALIB_IF_SINGLETONS(...) __VA_ARGS__
333
# define ALIB_IFN_SINGLETONS(...)
334
#else
335
# define ALIB_IF_SINGLETONS(...)
336
# define ALIB_IFN_SINGLETONS(...) __VA_ARGS__
337
#endif
338
339
#if ALIB_STRINGS
340
# define ALIB_IF_STRINGS(...) __VA_ARGS__
341
# define ALIB_IFN_STRINGS(...)
342
#else
343
# define ALIB_IF_STRINGS(...)
344
# define ALIB_IFN_STRINGS(...) __VA_ARGS__
345
#endif
346
347
#if ALIB_SYSTEM
348
# define ALIB_IF_SYSTEM(...) __VA_ARGS__
349
# define ALIB_IFN_SYSTEM(...)
350
#else
351
# define ALIB_IF_SYSTEM(...)
352
# define ALIB_IFN_SYSTEM(...) __VA_ARGS__
353
#endif
354
355
#if ALIB_TEXT
356
# define ALIB_IF_TEXT(...) __VA_ARGS__
357
# define ALIB_IFN_TEXT(...)
358
#else
359
# define ALIB_IF_TEXT(...)
360
# define ALIB_IFN_TEXT(...) __VA_ARGS__
361
#endif
362
363
#if ALIB_THREADS
364
# define ALIB_IF_THREADS(...) __VA_ARGS__
365
# define ALIB_IFN_THREADS(...)
366
#else
367
# define ALIB_IF_THREADS(...)
368
# define ALIB_IFN_THREADS(...) __VA_ARGS__
369
#endif
370
371
#if ALIB_TIME
372
# define ALIB_IF_TIME(...) __VA_ARGS__
373
# define ALIB_IFN_TIME(...)
374
#else
375
# define ALIB_IF_TIME(...)
376
# define ALIB_IFN_TIME(...) __VA_ARGS__
377
#endif
378
379
#endif // HPP_ALIB_MODULES