Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
dfw_field_trial_service_library.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 #ifndef DFW_FIELD_TRIAL_SERVICE_LIBRARY_H
22 #define DFW_FIELD_TRIAL_SERVICE_LIBRARY_H
23 
24 #include "library.h"
25 #include "typedefs.h"
26 
27 /*
28 ** Now we use the generic helper definitions above to define LIB_API and LIB_LOCAL.
29 ** LIB_API is used for the public API symbols. It either DLL imports or DLL exports
30 ** (or does nothing for static build)
31 ** LIB_LOCAL is used for non-api symbols.
32 */
33 
34 #ifdef SHARED_LIBRARY /* defined if LIB is compiled as a DLL */
35  #ifdef DFW_FIELD_TRIAL_LIBRARY_EXPORTS /* defined if we are building the LIB DLL (instead of using it) */
36  #define DFW_FIELD_TRIAL_SERVICE_API LIB_HELPER_SYMBOL_EXPORT
37  #else
38  #define DFW_FIELD_TRIAL_SERVICE_API LIB_HELPER_SYMBOL_IMPORT
39  #endif /* #ifdef DFW_FIELD_TRIAL_LIBRARY_EXPORTS */
40  #define DFW_FIELD_TRIAL_SERVICE_LOCAL LIB_HELPER_SYMBOL_LOCAL
41 #else /* SHARED_LIBRARY is not defined: this means LIB is a static lib. */
42  #define DFW_FIELD_TRIAL_SERVICE_API
43  #define DFW_FIELD_TRIAL_SERVICE_LOCAL
44 #endif /* #ifdef SHARED_LIBRARY */
45 
46 
47 
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
49 
50 #ifdef ALLOCATE_DFW_FIELD_TRIAL_SERVICE_CONSTANTS
51  #define DFW_FIELD_TRIAL_SERVICE_PREFIX DFW_FIELD_TRIAL_SERVICE_LOCAL
52  #define DFW_FIELD_TRIAL_SERVICE_VAL(x) = x
53  #define DFW_FIELD_TRIAL_SERVICE_STRUCT_VAL(x,y) = { x, y}
54 #else
55  #define DFW_FIELD_TRIAL_SERVICE_PREFIX extern
56  #define DFW_FIELD_TRIAL_SERVICE_VAL(x)
57  #define DFW_FIELD_TRIAL_SERVICE_STRUCT_VAL(x,y)
58 #endif
59 
60 #endif /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */
61 
62 
63 
64 DFW_FIELD_TRIAL_SERVICE_PREFIX const uint32 DFW_UNSET_ID DFW_FIELD_TRIAL_SERVICE_VAL(UINT_LEAST32_MAX);
65 
66 #endif /* #ifndef DFW_FIELD_TRIAL_SERVICE_LIBRARY_H */
typedefs.h
library.h
DFW_FIELD_TRIAL_SERVICE_VAL
const DFW_FIELD_TRIAL_SERVICE_PREFIX uint32 DFW_UNSET_ID DFW_FIELD_TRIAL_SERVICE_VAL(UINT_LEAST32_MAX)