IMP  2.4.0
The Integrative Modeling Platform
kmeans_config.h
1 /*
2  * \file IMP/kmeans/kmeans_config.h
3  * \brief Provide macros to mark functions and classes as exported
4  * from a DLL/.so, and to set up namespaces
5  *
6  * When building the module, IMPKMEANS_EXPORTS should be defined, and when
7  * using the module externally, it should not be. Classes and functions
8  * declared in the module's headers should then be marked with
9  * IMPKMEANSEXPORT if they are intended to be part of the API and
10  * they are not defined entirely in a header.
11  *
12  * The Windows build environment requires applications to mark exports in
13  * this way; we use the same markings to set the visibility of ELF symbols
14  * if we have compiler support.
15  *
16  * All code in this module should live in the IMP::kmeans namespace.
17  * This is simply achieved by wrapping things with the
18  * IMPKMEANS_BEGIN_NAMESPACE and IMPKMEANS_END_NAMESPACE macros.
19  * There are similar macros for module code that is designed to be for
20  * internal use only.
21  *
22  * This header is auto-generated by tools/build/setup_module.py;
23  * it should not be edited manually.
24  *
25  * Copyright 2007-2015 IMP Inventors. All rights reserved.
26  *
27  */
28 
29 #ifndef IMPKMEANS_CONFIG_H
30 #define IMPKMEANS_CONFIG_H
31 
32 #include <IMP/base/base_config.h>
33 #include <string>
34 
35 #ifdef _MSC_VER
36 
37 #ifdef IMPKMEANS_EXPORTS
38 #define IMPKMEANSEXPORT __declspec(dllexport)
39 #else // EXPORTS
40 #define IMPKMEANSEXPORT __declspec(dllimport)
41 #endif // EXPORTS
42 
43 #else // _MSC_VER
44 
45 #ifdef GCC_VISIBILITY
46 #define IMPKMEANSEXPORT __attribute__((visibility("default")))
47 #else // GCC_VISIBILITY
48 #define IMPKMEANSEXPORT
49 #endif // GCC_VISIBILITY
50 
51 #endif // _MSC_VER
52 
53 #if defined(_MSC_VER) && !defined(SWIG)
54 #ifdef IMPKMEANS_EXPORTS
55 
56 #define IMPKMEANS_EXPORT_TEMPLATE(name) \
57  template class __declspec(dllexport) name
58 
59 #else //EXPORTS
60 
61 #define IMPKMEANS_EXPORT_TEMPLATE(name) \
62  template class __declspec(dllimport) name
63 
64 #endif // EXPORTS
65 
66 #else // MSC and SWIG
67 #define IMPKMEANS_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
68 
69 #endif // MSC and SWIG
70 
71 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
72 
73 #define IMPKMEANS_BEGIN_NAMESPACE \
74  IMP_COMPILER_ENABLE_WARNINGS namespace IMP{namespace kmeans {
75 
76 #define IMPKMEANS_END_NAMESPACE } } \
77 IMP_COMPILER_DISABLE_WARNINGS
78 
79 #define IMPKMEANS_BEGIN_INTERNAL_NAMESPACE IMPKMEANS_BEGIN_NAMESPACE \
80  namespace internal {
81 
82 #define IMPKMEANS_END_INTERNAL_NAMESPACE } IMPKMEANS_END_NAMESPACE
83 
84 #else // SWIG and DOXYGEN
85 #define IMPKMEANS_BEGIN_NAMESPACE namespace IMP{namespace kmeans {
86 
87 #define IMPKMEANS_END_NAMESPACE } }
88 
89 #define IMPKMEANS_BEGIN_INTERNAL_NAMESPACE IMPKMEANS_BEGIN_NAMESPACE\
90  namespace internal {
91 
92 #define IMPKMEANS_END_INTERNAL_NAMESPACE } IMPKMEANS_END_NAMESPACE
93 
94 #endif // SWIG AND DOXYGEN
95 
96 #define IMP_KMEANS_USE_BOOST_FILESYSTEM
97 #define IMP_KMEANS_HAS_BOOST_FILESYSTEM 1
98 #define IMP_KMEANS_USE_BOOST_PROGRAMOPTIONS
99 #define IMP_KMEANS_HAS_BOOST_PROGRAMOPTIONS 1
100 #define IMP_KMEANS_USE_BOOST_RANDOM
101 #define IMP_KMEANS_HAS_BOOST_RANDOM 1
102 #define IMP_KMEANS_USE_BOOST_SYSTEM
103 #define IMP_KMEANS_HAS_BOOST_SYSTEM 1
104 
105 // functions are defined explicitly for SWIG
106 namespace IMP {
107  namespace kmeans {
108 /** \name Standard module functions
109  All \imp modules have a set of standard functions to help get information
110  about the module and about files associated with the module.
111  @{
112  */
113 #if !defined(SWIG)
114  IMPKMEANSEXPORT std::string get_module_version();
115 #endif
116 
117 #if !defined(SWIG)
118  // SWIG will whine about duplicate definitions of function
119  inline std::string get_module_name() { return "IMP::kmeans"; }
120 #endif
121 
122  //! Return the full path to installed data
123  /** Each module has its own data directory, so be sure to use
124  the version of this function in the correct module. To read
125  the data file "data_library" that was placed in the \c data
126  directory of module "mymodule", do something like
127  \code
128  std::ifstream in(IMP::mymodule::get_data_path("data_library"));
129  \endcode
130  This will ensure that the code works when \imp is installed or
131  used via the \c setup_environment.sh script.
132  */
133 #if !defined(SWIG)
134  IMPKMEANSEXPORT std::string get_data_path(std::string file_name);
135 #endif
136 
137  //! Return the path to installed example data for this module
138  /** Each module has its own example directory, so be sure to use
139  the version of this function in the correct module. For example
140  to read the file \c example_protein.pdb located in the
141  \c examples directory of the IMP::atom module, do
142  \code
143  IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb",
144  model));
145  \endcode
146  This will ensure that the code works when \imp is installed or
147  used via the \c setup_environment.sh script.
148  */
149 #if !defined(SWIG)
150  IMPKMEANSEXPORT std::string get_example_path(std::string file_name);
151 #endif
152  /** @} */
153 
154 
155  }
156 } //namespace
157 
158 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
159 
160 #include <IMP/base/Showable.h>
161 #include <IMP/base/hash.h>
162 
163 namespace IMP { namespace kmeans {
164 using ::IMP::base::Showable;
165 using ::IMP::base::operator<<;
166 using ::IMP::base::hash_value;
167 } } // namespace
168 namespace IMP { namespace kmeans { namespace internal {
169 using ::IMP::base::Showable;
170 using ::IMP::base::operator<<;
171 using ::IMP::base::hash_value;
172 } } } // namespace
173 
174 #endif // !defined(SWIG) && !defined(IMP_DOXYGEN)
175 
176 
178 
179 #endif /* IMPKMEANS_CONFIG_H */
180 
181 // Here so it is always parsed
182 
183 #ifdef IMPKMEANS_DEPRECATED_HEADER
184 #undef IMPKMEANS_DEPRECATED_HEADER
185 #undef IMPKMEANS_DEPRECATED_VALUE_DEF
186 #undef IMPKMEANS_DEPRECATED_VALUE_DECL
187 #undef IMPKMEANS_DEPRECATED_OBJECT_DEF
188 #undef IMPKMEANS_DEPRECATED_OBJECT_DECL
189 #undef IMPKMEANS_DEPRECATED_FUNCTION_DEF
190 #undef IMPKMEANS_DEPRECATED_FUNCTION_DECL
191 #undef IMPKMEANS_DEPRECATED_METHOD_DEF
192 #undef IMPKMEANS_DEPRECATED_METHOD_DECL
193 #undef IMPKMEANS_DEPRECATED_MACRO
194 #undef IMPKMEANS_SHOW_WARNINGS
195 #endif
196 
197 // the central modules we can update easily, so don't warn in them
198 #if defined( IMPKMEANS_COMPILATION) \
199  || defined(SWIG) || defined(IMP_SWIG_WRAPPER) \
200  || defined( IMPKMEANS_ALL) || defined(IMP_DOXYGEN) \
201  || defined(IMPBASE_COMPILATION) || defined(IMPKERNEL_COMPILATION) \
202  || defined(IMPCORE_COMPILATION) || defined(IMPATOM_COMPILATION) \
203  || defined(IMPSTATISTICS_COMPILATION) || defined(IMPDOMINO_COMPILATION) \
204  || defined(IMPCONTAINER_COMPILATION) || defined(IMPDISPLAY_COMPILATION) \
205  || defined(IMPSCOREFUNCTOR_COMPILATION) || defined(IMPRMF_COMPILATION) \
206  || defined(IMPGSL_COMPILATION)
207 #define IMPKMEANS_SHOW_WARNINGS 0
208 #else
209 #define IMPKMEANS_SHOW_WARNINGS 1
210 #endif
211 
212 // suppress header warnings with all header, SWIG wrapper and in the module
213 #if IMPKMEANS_SHOW_WARNINGS
214 #define IMPKMEANS_DEPRECATED_HEADER(version, help_message) \
215  IMP_PRAGMA(message(__FILE__ " is deprecated: " help_message))
216 #define IMPKMEANS_DEPRECATED_VALUE_DECL(version) \
217  IMP_DEPRECATED_ATTRIBUTE
218 #define IMPKMEANS_DEPRECATED_OBJECT_DECL(version) \
219  IMP_DEPRECATED_ATTRIBUTE
220 #define IMPKMEANS_DEPRECATED_FUNCTION_DECL(version) \
221  IMP_DEPRECATED_ATTRIBUTE
222 #define IMPKMEANS_DEPRECATED_METHOD_DECL(version) \
223  IMP_DEPRECATED_ATTRIBUTE
224 
225 #else //IMPKMEANS_SHOW_WARNINGS
226 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
227 #define IMPKMEANS_DEPRECATED_HEADER(version, help_message) \
228 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
229 #define IMPKMEANS_DEPRECATED_VALUE_DECL(version)
230 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
231 #define IMPKMEANS_DEPRECATED_OBJECT_DECL(version)
232 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
233 #define IMPKMEANS_DEPRECATED_FUNCTION_DECL(version)
234 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
235 #define IMPKMEANS_DEPRECATED_METHOD_DECL(version)
236 
237 #endif // IMPKMEANS_SHOW_WARNINGS
238 
239 // only warn about it in the all inclusion to cut down on copies
240 #if !defined(IMP_ALL) || defined(SWIG) || defined(IMP_DOXYGEN) \
241  || defined(IMPBASE_COMPILATION) || defined(IMPKERNEL_COMPILATION) \
242  || defined(IMPCORE_COMPILATION) || defined(IMPATOM_COMPILATION) \
243  || defined(IMPSTATISTICS_COMPILATION) || defined(IMPDOMINO_COMPILATION) \
244  || defined(IMPCONTAINER_COMPILATION) || defined(IMPDISPLAY_COMPILATION) \
245  || defined(IMPSCOREFUNCTOR_COMPILATION)
246 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
247 #define IMPKMEANS_DEPRECATED_MACRO(version, message)
248 
249 #else
250 #define IMPKMEANS_DEPRECATED_MACRO(version, message) \
251  IMP_DEPRECATED_MACRO(version, message)
252 #endif
253 
254 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
255 #define IMPKMEANS_DEPRECATED_VALUE_DEF(version, message) \
256  IMP_DEPRECATED_VALUE_RUNTIME_WARNING(version, message)
257 
258 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
259 #define IMPKMEANS_DEPRECATED_OBJECT_DEF(version, message) \
260  IMP_DEPRECATED_OBJECT_RUNTIME_WARNING(version, message)
261 
262 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
263 #define IMPKMEANS_DEPRECATED_FUNCTION_DEF(version, message) \
264  IMP_DEPRECATED_FUNCTION_RUNTIME_WARNING(version, message)
265 
266 /** See [deprecation support](https://github.com/salilab/imp/wiki/Deprecation). */
267 #define IMPKMEANS_DEPRECATED_METHOD_DEF(version, message) \
268  IMP_DEPRECATED_METHOD_RUNTIME_WARNING(version, message)
269 
270 
272 
273 #if defined(IMP_EXECUTABLE) && !defined(IMP_EXECUTABLE_WARNINGS)
274 IMP_COMPILER_ENABLE_WARNINGS
275 #define IMP_EXECUTABLE_WARNINGS
276 #endif
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
std::string get_data_path(std::string file_name)
Return the full path to installed data.
IO support.
IO support.
Various compiler workarounds.