IMP  2.0.0
The Integrative Modeling Platform
parallel_config.h
1 
2 /*
3  * \file IMP/parallel/parallel_config.h
4  * \brief Provide macros to mark functions and classes as exported
5  * from a DLL/.so, and to set up namespaces
6  *
7  * When building the module, IMPPARALLEL_EXPORTS should be defined, and when
8  * using the module externally, it should not be. Classes and functions
9  * declared in the module's headers should then be marked with
10  * IMPPARALLELEXPORT if they are intended to be part of the API and
11  * they are not defined entirely in a header.
12  *
13  * The Windows build environment requires applications to mark exports in
14  * this way; we use the same markings to set the visibility of ELF symbols
15  * if we have compiler support.
16  *
17  * All code in this module should live in the IMP::parallel namespace.
18  * This is simply achieved by wrapping things with the
19  * IMPPARALLEL_BEGIN_NAMESPACE and IMPPARALLEL_END_NAMESPACE macros.
20  * There are similar macros for module code that is designed to be for
21  * internal use only.
22  *
23  * This header is auto-generated by tools/build/setup_module.py;
24  * it should not be edited manually.
25  *
26  * Copyright 2007-2013 IMP Inventors. All rights reserved.
27  *
28  */
29 
30 #ifndef IMPPARALLEL_CONFIG_H
31 #define IMPPARALLEL_CONFIG_H
32 
33 #include <IMP/base/base_config.h>
34 #include <string>
35 
36 
37 #ifdef _MSC_VER
38 
39 #ifdef IMPPARALLEL_EXPORTS
40 #define IMPPARALLELEXPORT __declspec(dllexport)
41 #else // EXPORTS
42 #define IMPPARALLELEXPORT __declspec(dllimport)
43 #endif // EXPORTS
44 
45 #else // _MSC_VER
46 
47 #ifdef GCC_VISIBILITY
48 #define IMPPARALLELEXPORT __attribute__ ((visibility("default")))
49 #else // GCC_VISIBILITY
50 #define IMPPARALLELEXPORT
51 #endif // GCC_VISIBILITY
52 #endif // _MSC_VER
53 
54 #if defined(_MSC_VER) && !defined(SWIG)
55 #ifdef IMPPARALLEL_EXPORTS
56 
57 #define IMPPARALLEL_EXPORT_TEMPLATE(name) template class __declspec(dllexport) name
58 
59 #else //EXPORTS
60 
61 #define IMPPARALLEL_EXPORT_TEMPLATE(name) template class __declspec(dllimport) name
62 
63 #endif // EXPORTS
64 
65 #else // MSC and SWIG
66 #define IMPPARALLEL_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
67 
68 #endif // MSC and SWIG
69 
70 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
71 
72 #define IMPPARALLEL_BEGIN_NAMESPACE \
73 IMP_COMPILER_ENABLE_WARNINGS \
74 namespace IMP { namespace parallel { \
75 
76 #define IMPPARALLEL_END_NAMESPACE \
77 } } \
78 IMP_COMPILER_DISABLE_WARNINGS
79 
80 #define IMPPARALLEL_BEGIN_INTERNAL_NAMESPACE \
81 IMPPARALLEL_BEGIN_NAMESPACE namespace internal {
82 
83 
84 #define IMPPARALLEL_END_INTERNAL_NAMESPACE \
85 } IMPPARALLEL_END_NAMESPACE
86 
87 #else
88 #define IMPPARALLEL_BEGIN_NAMESPACE \
89 namespace IMP { namespace parallel {
90 
91 #define IMPPARALLEL_END_NAMESPACE \
92 } }
93 
94 #define IMPPARALLEL_BEGIN_INTERNAL_NAMESPACE \
95 IMPPARALLEL_BEGIN_NAMESPACE namespace internal {
96 
97 
98 #define IMPPARALLEL_END_INTERNAL_NAMESPACE \
99 } IMPPARALLEL_END_NAMESPACE
100 
101 #endif
102 
103 #define IMP_PARALLEL_USE_IMP_ALGEBRA
104 #define IMP_PARALLEL_HAS_IMP_ALGEBRA 1
105 #define IMP_PARALLEL_USE_IMP_BASE
106 #define IMP_PARALLEL_HAS_IMP_BASE 1
107 #define IMP_PARALLEL_USE_IMP_CGAL
108 #define IMP_PARALLEL_HAS_IMP_CGAL 1
109 #define IMP_PARALLEL_USE_BOOST_FILESYSTEM
110 #define IMP_PARALLEL_HAS_BOOST_FILESYSTEM 1
111 #define IMP_PARALLEL_USE_BOOST_PROGRAMOPTIONS
112 #define IMP_PARALLEL_HAS_BOOST_PROGRAMOPTIONS 1
113 #define IMP_PARALLEL_USE_BOOST_RANDOM
114 #define IMP_PARALLEL_HAS_BOOST_RANDOM 1
115 #define IMP_PARALLEL_USE_BOOST_SYSTEM
116 #define IMP_PARALLEL_HAS_BOOST_SYSTEM 1
117 #define IMP_PARALLEL_USE_CGAL
118 #define IMP_PARALLEL_HAS_CGAL 1
119 
120 // functions are defined explicitly for swig
121 
122 namespace IMP { namespace parallel {
123 /** \name Standard module methods
124  All \imp modules have a set of standard methods to help get information
125  about the module and about files associated with the module.
126  @{
127  */
128 #if !defined(SWIG)
129 IMPPARALLELEXPORT std::string get_module_version();
130 #endif
131 
132 #if !defined(SWIG)
133 // swig will whine about duplicate definitions of function
134 inline std::string get_module_name() {
135  return "IMP::parallel";
136 }
137 #endif
138 
139 } } //namespace
140 
141 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
142 
143 #include <IMP/base/Showable.h>
144 #include <IMP/base/hash.h>
145 
146 namespace IMP { namespace parallel {
147 using ::IMP::base::Showable;
148 using ::IMP::base::operator<<;
149 using ::IMP::base::hash_value;
150 } } // namespace
151 namespace IMP { namespace parallel { namespace internal {
152 using ::IMP::base::Showable;
153 using ::IMP::base::operator<<;
154 using ::IMP::base::hash_value;
155 } } } // namespace
156 
157 #endif // !defined(SWIG) && !defined(IMP_DOXYGEN)
158 
159 
160 #if !defined(SWIG)
161 
162 namespace IMP { namespace parallel {
163 
164 //! Return the full path to installed data
165 /** Each module has its own data directory, so be sure to use
166  the version of this function in the correct module. To read
167  the data file "data_library" that was placed in the \c data
168  directory of module "mymodule", do something like
169  \code
170  std::ifstream in(IMP::mymodule::get_data_path("data_library"));
171  \endcode
172  This will ensure that the code works when \imp is installed or
173  used via the \c tools/imppy.sh script.
174 */
175 IMPPARALLELEXPORT std::string get_data_path(std::string file_name);
176 
177 //! Return the path to installed example data for this module
178 /** Each module has its own example directory, so be sure to use
179  the version of this function in the correct module. For example
180  to read the file \c example_protein.pdb located in the
181  \c examples directory of the IMP::atom module, do
182  \code
183  IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb", model));
184  \endcode
185  This will ensure that the code works when \imp is installed or
186  used via the \c tools/imppy.sh script.
187 */
188 IMPPARALLELEXPORT std::string get_example_path(std::string file_name);
189 /** @} */
190 
191 
192 } } // namespace
193 
194 #endif // SWIG
195 
197 
198 #ifdef IMP_DOXYGEN
199 /** \namespace IMP::parallel
200  \brief See \ref IMP_parallel_overview "IMP.parallel Overview" for more information.
201  */
202 #endif
203 
204 #endif /* IMPPARALLEL_CONFIG_H */