IMP logo
IMP Reference Guide  develop.6f18bfa751,2025/09/20
The Integrative Modeling Platform
kernel_config.h
1 // Autogenerated by ../../../../tmp/nightly-build-380/imp-20250920.develop.6f18bfa751/tools/build/setup_module.py
2 // from ../../../../tmp/nightly-build-380/imp-20250920.develop.6f18bfa751/tools/build/config_templates/header.h
3 // Do not edit - any changes will be lost!
4 
5 /*
6  * \file IMP/kernel_config.h
7  * \brief Provide macros to mark functions and classes as exported
8  * from a DLL/.so, and to set up namespaces
9  *
10  * When building the module, IMPKERNEL_EXPORTS should be defined, and when
11  * using the module externally, it should not be. Classes and functions
12  * declared in the module's headers should then be marked with
13  * IMPKERNELEXPORT if they are intended to be part of the API and
14  * they are not defined entirely in a header.
15  *
16  * The Windows build environment requires applications to mark exports in
17  * this way; we use the same markings to set the visibility of ELF symbols
18  * if we have compiler support.
19  *
20  * All code in this module should live in the IMP namespace.
21  * This is simply achieved by wrapping things with the
22  * IMPKERNEL_BEGIN_NAMESPACE and IMPKERNEL_END_NAMESPACE macros.
23  * There are similar macros for module code that is designed to be for
24  * internal use only.
25  *
26  * Copyright 2007-2022 IMP Inventors. All rights reserved.
27  *
28  */
29 
30 #ifndef IMPKERNEL_CONFIG_H
31 #define IMPKERNEL_CONFIG_H
32 
33 #include <IMP/kernel_config.h>
34 #include <string>
35 
36 #ifdef _MSC_VER
37 #define NOMINMAX
38 
39 #ifdef IMPKERNEL_EXPORTS
40 #define IMPKERNELEXPORT __declspec(dllexport)
41 #else // EXPORTS
42 #define IMPKERNELEXPORT __declspec(dllimport)
43 #endif // EXPORTS
44 
45 #else // _MSC_VER
46 
47 #ifdef GCC_VISIBILITY
48 #define IMPKERNELEXPORT __attribute__((visibility("default")))
49 #else // GCC_VISIBILITY
50 #define IMPKERNELEXPORT
51 #endif // GCC_VISIBILITY
52 
53 #endif // _MSC_VER
54 
55 #if defined(_MSC_VER) && !defined(SWIG)
56 #ifdef IMPKERNEL_EXPORTS
57 
58 #define IMPKERNEL_EXPORT_TEMPLATE(name) \
59  template class __declspec(dllexport) name
60 
61 #else //EXPORTS
62 
63 #define IMPKERNEL_EXPORT_TEMPLATE(name) \
64  template class __declspec(dllimport) name
65 
66 #endif // EXPORTS
67 
68 #else // MSC and SWIG
69 #define IMPKERNEL_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
70 
71 #endif // MSC and SWIG
72 
73 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
74 
75 #define IMPKERNEL_BEGIN_NAMESPACE \
76  IMP_COMPILER_ENABLE_WARNINGS namespace IMP{
77 
78 #define IMPKERNEL_END_NAMESPACE } \
79 IMP_COMPILER_DISABLE_WARNINGS
80 
81 #define IMPKERNEL_BEGIN_INTERNAL_NAMESPACE IMPKERNEL_BEGIN_NAMESPACE \
82  namespace internal {
83 
84 #define IMPKERNEL_END_INTERNAL_NAMESPACE } IMPKERNEL_END_NAMESPACE
85 
86 #else // SWIG and DOXYGEN
87 #define IMPKERNEL_BEGIN_NAMESPACE namespace IMP{
88 
89 #define IMPKERNEL_END_NAMESPACE }
90 
91 #define IMPKERNEL_BEGIN_INTERNAL_NAMESPACE IMPKERNEL_BEGIN_NAMESPACE\
92  namespace internal {
93 
94 #define IMPKERNEL_END_INTERNAL_NAMESPACE } IMPKERNEL_END_NAMESPACE
95 
96 #endif // SWIG AND DOXYGEN
97 
98 #define IMP_BUILD IMP_RELEASE
99 #define IMP_HAS_LOG IMP_VERBOSE
100 #define IMP_HAS_CHECKS IMP_INTERNAL
101 #define IMP_DEBUG 0
102 #define IMP_RELEASE 1
103 #define IMP_SILENT 0
104 #define IMP_PROGRESS 2
105 #define IMP_TERSE 3
106 #define IMP_VERBOSE 4
107 #define IMP_MEMORY 5
108 #define IMP_NONE 0
109 #define IMP_USAGE 1
110 #define IMP_INTERNAL 2
111 #define IMP_KERNEL_HAS_LOG4CXX 0
112 #define IMP_COMPILER_HAS_CEREAL_RAW_POINTER 0
113 #define IMP_COMPILER_HAS_DEBUG_VECTOR 0
114 #define IMP_COMPILER_HAS_RANDOM_SHUFFLE 0
115 #define IMP_COMPILER_HAS_THREE_WAY 0
116 #define IMP_KERNEL_USE_BOOST_RANDOM
117 #define IMP_KERNEL_HAS_BOOST_RANDOM 1
118 #define IMP_KERNEL_USE_NUMPY
119 #define IMP_KERNEL_HAS_NUMPY 1
120 #define IMP_KERNEL_NO_BOOST_SYSTEM
121 #define IMP_KERNEL_HAS_BOOST_SYSTEM 0
122 #define IMP_KERNEL_NO_GPERFTOOLS
123 #define IMP_KERNEL_HAS_GPERFTOOLS 0
124 #define IMP_KERNEL_NO_TCMALLOC_HEAPCHECKER
125 #define IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER 0
126 #define IMP_KERNEL_NO_TCMALLOC_HEAPPROFILER
127 #define IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER 0
128 
129 // functions are defined explicitly for SWIG
130 namespace IMP{
131 /** \name Standard module functions
132  All \imp modules have a set of standard functions to help get information
133  about the module and about files associated with the module.
134  @{
135  */
136 #if !defined(SWIG) || defined(IMP_SWIG_WRAPPER)
137  IMPKERNELEXPORT std::string get_module_version();
138 #endif
139 
140 #if !defined(SWIG) || defined(IMP_SWIG_WRAPPER)
141  // SWIG will whine about duplicate definitions of function
142  inline std::string get_module_name() { return "IMP"; }
143 #endif
144 
145  //! Return the full path to one of this module's data files
146  /** To read the data file "data_library" that was placed in the \c data
147  directory of this module, do something like
148  \code
149  std::ifstream in(IMP::get_data_path("data_library"));
150  \endcode
151  This will ensure that the code works both when IMP is installed or
152  if used via the \c setup_environment.sh script.
153 
154  \note Each module has its own data directory, so be sure to use
155  this function from the correct module.
156  */
157 #if !defined(SWIG)
158  IMPKERNELEXPORT std::string get_data_path(std::string file_name);
159 #endif
160 
161  //! Return the full path to one of this module's example files
162  /** To read the example file "example_protein.pdb" that was placed
163  in the \c examples directory of this module, do something like
164  \code
165  std::ifstream in(IMP::get_example_path("example_protein.pdb"));
166  \endcode
167  This will ensure that the code works both when IMP is installed or
168  if used via the \c setup_environment.sh script.
169 
170  \note Each module has its own example directory, so be sure to use
171  this function from the correct module.
172  */
173 #if !defined(SWIG)
174  IMPKERNELEXPORT std::string get_example_path(std::string file_name);
175 #endif
176  /** @} */
177 
178 
179 } //namespace
180 
181 
182 
183 #include <IMP/compiler_macros.h>
184 
185 #endif /* IMPKERNEL_CONFIG_H */
186 
187 // Here so it is always parsed
188 
189 #ifdef IMPKERNEL_DEPRECATED_HEADER
190 #undef IMPKERNEL_DEPRECATED_HEADER
191 #undef IMPKERNEL_DEPRECATED_VALUE_DEF
192 #undef IMPKERNEL_DEPRECATED_VALUE_DECL
193 #undef IMPKERNEL_DEPRECATED_OBJECT_DEF
194 #undef IMPKERNEL_DEPRECATED_OBJECT_DECL
195 #undef IMPKERNEL_DEPRECATED_FUNCTION_DEF
196 #undef IMPKERNEL_DEPRECATED_FUNCTION_DECL
197 #undef IMPKERNEL_DEPRECATED_METHOD_DEF
198 #undef IMPKERNEL_DEPRECATED_METHOD_DECL
199 #undef IMPKERNEL_DEPRECATED_MACRO
200 #undef IMPKERNEL_SHOW_WARNINGS
201 #endif
202 
203 // the central modules we can update easily, so don't warn in them
204 #if defined( IMPKERNEL_COMPILATION) \
205  || defined(SWIG) || defined(IMP_SWIG_WRAPPER) \
206  || defined( IMPKERNEL_ALL) || defined(IMP_DOXYGEN) \
207  || defined(IMPBASE_COMPILATION) || defined(IMPKERNEL_COMPILATION) \
208  || defined(IMPCORE_COMPILATION) || defined(IMPATOM_COMPILATION) \
209  || defined(IMPSTATISTICS_COMPILATION) || defined(IMPDOMINO_COMPILATION) \
210  || defined(IMPCONTAINER_COMPILATION) || defined(IMPDISPLAY_COMPILATION) \
211  || defined(IMPSCOREFUNCTOR_COMPILATION) || defined(IMPRMF_COMPILATION) \
212  || defined(IMPGSL_COMPILATION)
213 #define IMPKERNEL_SHOW_WARNINGS 0
214 #else
215 #define IMPKERNEL_SHOW_WARNINGS 1
216 #endif
217 
218 // suppress header warnings with all header, SWIG wrapper and in the module
219 #if IMPKERNEL_SHOW_WARNINGS
220 #define IMPKERNEL_DEPRECATED_HEADER(version, help_message) \
221  IMP_PRAGMA(message(__FILE__ " is deprecated: " help_message))
222 #define IMPKERNEL_DEPRECATED_VALUE_DECL(version) \
223  IMP_DEPRECATED_ATTRIBUTE
224 #define IMPKERNEL_DEPRECATED_OBJECT_DECL(version) \
225  IMP_DEPRECATED_ATTRIBUTE
226 #define IMPKERNEL_DEPRECATED_FUNCTION_DECL(version) \
227  IMP_DEPRECATED_ATTRIBUTE
228 #define IMPKERNEL_DEPRECATED_METHOD_DECL(version) \
229  IMP_DEPRECATED_ATTRIBUTE
230 
231 #else //IMPKERNEL_SHOW_WARNINGS
232 /** See [deprecation support](@ref deprecation). */
233 #define IMPKERNEL_DEPRECATED_HEADER(version, help_message) \
234 /** See [deprecation support](@ref deprecation). */
235 #define IMPKERNEL_DEPRECATED_VALUE_DECL(version)
236 /** See [deprecation support](@ref deprecation). */
237 #define IMPKERNEL_DEPRECATED_OBJECT_DECL(version)
238 /** See [deprecation support](@ref deprecation). */
239 #define IMPKERNEL_DEPRECATED_FUNCTION_DECL(version)
240 /** See [deprecation support](@ref deprecation). */
241 #define IMPKERNEL_DEPRECATED_METHOD_DECL(version)
242 
243 #endif // IMPKERNEL_SHOW_WARNINGS
244 
245 // only warn about it in the all inclusion to cut down on copies
246 #if !defined(IMP_ALL) || defined(SWIG) || defined(IMP_DOXYGEN) \
247  || defined(IMPBASE_COMPILATION) || defined(IMPKERNEL_COMPILATION) \
248  || defined(IMPCORE_COMPILATION) || defined(IMPATOM_COMPILATION) \
249  || defined(IMPSTATISTICS_COMPILATION) || defined(IMPDOMINO_COMPILATION) \
250  || defined(IMPCONTAINER_COMPILATION) || defined(IMPDISPLAY_COMPILATION) \
251  || defined(IMPSCOREFUNCTOR_COMPILATION)
252 /** See [deprecation support](@ref deprecation). */
253 #define IMPKERNEL_DEPRECATED_MACRO(version, message)
254 
255 #else
256 #define IMPKERNEL_DEPRECATED_MACRO(version, message) \
257  IMP_DEPRECATED_MACRO(version, message)
258 #endif
259 
260 /** See [deprecation support](@ref deprecation). */
261 #define IMPKERNEL_DEPRECATED_VALUE_DEF(version, message) \
262  IMP_DEPRECATED_VALUE_RUNTIME_WARNING(version, message)
263 
264 /** See [deprecation support](@ref deprecation). */
265 #define IMPKERNEL_DEPRECATED_OBJECT_DEF(version, message) \
266  IMP_DEPRECATED_OBJECT_RUNTIME_WARNING(version, message)
267 
268 /** See [deprecation support](@ref deprecation). */
269 #define IMPKERNEL_DEPRECATED_FUNCTION_DEF(version, message) \
270  IMP_DEPRECATED_FUNCTION_RUNTIME_WARNING(version, message)
271 
272 /** See [deprecation support](@ref deprecation). */
273 #define IMPKERNEL_DEPRECATED_METHOD_DEF(version, message) \
274  IMP_DEPRECATED_METHOD_RUNTIME_WARNING(version, message)
275 
276 
277 #include <IMP/compiler_macros.h>
278 
279 #if defined(IMP_EXECUTABLE) && !defined(IMP_EXECUTABLE_WARNINGS)
280 IMP_COMPILER_ENABLE_WARNINGS
281 #define IMP_EXECUTABLE_WARNINGS
282 #endif
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Various compiler workarounds.
std::string get_module_version()
Return the version of this module, as a string.