IMP  2.0.1
The Integrative Modeling Platform
core_config.h
1 
2 /*
3  * \file IMP/core/core_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, IMPCORE_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  * IMPCOREEXPORT 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::core namespace.
18  * This is simply achieved by wrapping things with the
19  * IMPCORE_BEGIN_NAMESPACE and IMPCORE_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 IMPCORE_CONFIG_H
31 #define IMPCORE_CONFIG_H
32 
33 #include <IMP/base/base_config.h>
34 #include <string>
35 
36 
37 #ifdef _MSC_VER
38 
39 #ifdef IMPCORE_EXPORTS
40 #define IMPCOREEXPORT __declspec(dllexport)
41 #else // EXPORTS
42 #define IMPCOREEXPORT __declspec(dllimport)
43 #endif // EXPORTS
44 
45 #else // _MSC_VER
46 
47 #ifdef GCC_VISIBILITY
48 #define IMPCOREEXPORT __attribute__ ((visibility("default")))
49 #else // GCC_VISIBILITY
50 #define IMPCOREEXPORT
51 #endif // GCC_VISIBILITY
52 #endif // _MSC_VER
53 
54 #if defined(_MSC_VER) && !defined(SWIG)
55 #ifdef IMPCORE_EXPORTS
56 
57 #define IMPCORE_EXPORT_TEMPLATE(name) template class __declspec(dllexport) name
58 
59 #else //EXPORTS
60 
61 #define IMPCORE_EXPORT_TEMPLATE(name) template class __declspec(dllimport) name
62 
63 #endif // EXPORTS
64 
65 #else // MSC and SWIG
66 #define IMPCORE_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
67 
68 #endif // MSC and SWIG
69 
70 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
71 
72 #define IMPCORE_BEGIN_NAMESPACE \
73 IMP_COMPILER_ENABLE_WARNINGS \
74 namespace IMP { namespace core { \
75 
76 #define IMPCORE_END_NAMESPACE \
77 } } \
78 IMP_COMPILER_DISABLE_WARNINGS
79 
80 #define IMPCORE_BEGIN_INTERNAL_NAMESPACE \
81 IMPCORE_BEGIN_NAMESPACE namespace internal {
82 
83 
84 #define IMPCORE_END_INTERNAL_NAMESPACE \
85 } IMPCORE_END_NAMESPACE
86 
87 #else
88 #define IMPCORE_BEGIN_NAMESPACE \
89 namespace IMP { namespace core {
90 
91 #define IMPCORE_END_NAMESPACE \
92 } }
93 
94 #define IMPCORE_BEGIN_INTERNAL_NAMESPACE \
95 IMPCORE_BEGIN_NAMESPACE namespace internal {
96 
97 
98 #define IMPCORE_END_INTERNAL_NAMESPACE \
99 } IMPCORE_END_NAMESPACE
100 
101 #endif
102 
103 #define IMP_CORE_USE_IMP_BASE
104 #define IMP_CORE_HAS_IMP_BASE 1
105 #define IMP_CORE_USE_IMP_CGAL
106 #define IMP_CORE_HAS_IMP_CGAL 1
107 #define IMP_CORE_USE_IMP_KERNEL
108 #define IMP_CORE_HAS_IMP_KERNEL 1
109 #define IMP_CORE_USE_BOOST_FILESYSTEM
110 #define IMP_CORE_HAS_BOOST_FILESYSTEM 1
111 #define IMP_CORE_USE_BOOST_PROGRAMOPTIONS
112 #define IMP_CORE_HAS_BOOST_PROGRAMOPTIONS 1
113 #define IMP_CORE_USE_BOOST_RANDOM
114 #define IMP_CORE_HAS_BOOST_RANDOM 1
115 #define IMP_CORE_USE_BOOST_SYSTEM
116 #define IMP_CORE_HAS_BOOST_SYSTEM 1
117 #define IMP_CORE_USE_CGAL
118 #define IMP_CORE_HAS_CGAL 1
119 
120 // functions are defined explicitly for swig
121 
122 namespace IMP { namespace core {
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 IMPCOREEXPORT 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::core";
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 core {
147 using ::IMP::base::Showable;
148 using ::IMP::base::operator<<;
149 using ::IMP::base::hash_value;
150 } } // namespace
151 namespace IMP { namespace core { 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 core {
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 IMPCOREEXPORT 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 IMPCOREEXPORT 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::core
200  \brief See \ref IMP_core_overview "IMP.core Overview" for more information.
201  */
202 #endif
203 
204 #endif /* IMPCORE_CONFIG_H */