IMP  2.0.0
The Integrative Modeling Platform
system_config.h
1 
2 /*
3  * \file IMP/system/system_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, IMPSYSTEM_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  * IMPSYSTEMEXPORT 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::system namespace.
18  * This is simply achieved by wrapping things with the
19  * IMPSYSTEM_BEGIN_NAMESPACE and IMPSYSTEM_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 IMPSYSTEM_CONFIG_H
31 #define IMPSYSTEM_CONFIG_H
32 
33 #include <IMP/base/base_config.h>
34 #include <string>
35 
36 
37 #ifdef _MSC_VER
38 
39 #ifdef IMPSYSTEM_EXPORTS
40 #define IMPSYSTEMEXPORT __declspec(dllexport)
41 #else // EXPORTS
42 #define IMPSYSTEMEXPORT __declspec(dllimport)
43 #endif // EXPORTS
44 
45 #else // _MSC_VER
46 
47 #ifdef GCC_VISIBILITY
48 #define IMPSYSTEMEXPORT __attribute__ ((visibility("default")))
49 #else // GCC_VISIBILITY
50 #define IMPSYSTEMEXPORT
51 #endif // GCC_VISIBILITY
52 #endif // _MSC_VER
53 
54 #if defined(_MSC_VER) && !defined(SWIG)
55 #ifdef IMPSYSTEM_EXPORTS
56 
57 #define IMPSYSTEM_EXPORT_TEMPLATE(name) template class __declspec(dllexport) name
58 
59 #else //EXPORTS
60 
61 #define IMPSYSTEM_EXPORT_TEMPLATE(name) template class __declspec(dllimport) name
62 
63 #endif // EXPORTS
64 
65 #else // MSC and SWIG
66 #define IMPSYSTEM_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
67 
68 #endif // MSC and SWIG
69 
70 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
71 
72 #define IMPSYSTEM_BEGIN_NAMESPACE \
73 IMP_COMPILER_ENABLE_WARNINGS \
74 namespace IMP { namespace system { \
75 
76 #define IMPSYSTEM_END_NAMESPACE \
77 } } \
78 IMP_COMPILER_DISABLE_WARNINGS
79 
80 #define IMPSYSTEM_BEGIN_INTERNAL_NAMESPACE \
81 IMPSYSTEM_BEGIN_NAMESPACE namespace internal {
82 
83 
84 #define IMPSYSTEM_END_INTERNAL_NAMESPACE \
85 } IMPSYSTEM_END_NAMESPACE
86 
87 #else
88 #define IMPSYSTEM_BEGIN_NAMESPACE \
89 namespace IMP { namespace system {
90 
91 #define IMPSYSTEM_END_NAMESPACE \
92 } }
93 
94 #define IMPSYSTEM_BEGIN_INTERNAL_NAMESPACE \
95 IMPSYSTEM_BEGIN_NAMESPACE namespace internal {
96 
97 
98 #define IMPSYSTEM_END_INTERNAL_NAMESPACE \
99 } IMPSYSTEM_END_NAMESPACE
100 
101 #endif
102 
103 #define IMP_SYSTEM_USE_IMP_ALGEBRA
104 #define IMP_SYSTEM_HAS_IMP_ALGEBRA 1
105 #define IMP_SYSTEM_USE_IMP_BASE
106 #define IMP_SYSTEM_HAS_IMP_BASE 1
107 #define IMP_SYSTEM_USE_IMP_CGAL
108 #define IMP_SYSTEM_HAS_IMP_CGAL 1
109 #define IMP_SYSTEM_USE_BOOST_FILESYSTEM
110 #define IMP_SYSTEM_HAS_BOOST_FILESYSTEM 1
111 #define IMP_SYSTEM_USE_BOOST_PROGRAMOPTIONS
112 #define IMP_SYSTEM_HAS_BOOST_PROGRAMOPTIONS 1
113 #define IMP_SYSTEM_USE_BOOST_RANDOM
114 #define IMP_SYSTEM_HAS_BOOST_RANDOM 1
115 #define IMP_SYSTEM_USE_BOOST_SYSTEM
116 #define IMP_SYSTEM_HAS_BOOST_SYSTEM 1
117 #define IMP_SYSTEM_USE_CGAL
118 #define IMP_SYSTEM_HAS_CGAL 1
119 
120 // functions are defined explicitly for swig
121 
122 namespace IMP { namespace system {
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 IMPSYSTEMEXPORT 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::system";
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 system {
147 using ::IMP::base::Showable;
148 using ::IMP::base::operator<<;
149 using ::IMP::base::hash_value;
150 } } // namespace
151 namespace IMP { namespace system { 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 system {
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 IMPSYSTEMEXPORT 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 IMPSYSTEMEXPORT 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::system
200  \brief See \ref IMP_system_overview "IMP.system Overview" for more information.
201  */
202 #endif
203 
204 #endif /* IMPSYSTEM_CONFIG_H */