IMP  2.0.1
The Integrative Modeling Platform
atom_config.h
1 
2 /*
3  * \file IMP/atom/atom_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, IMPATOM_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  * IMPATOMEXPORT 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::atom namespace.
18  * This is simply achieved by wrapping things with the
19  * IMPATOM_BEGIN_NAMESPACE and IMPATOM_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 IMPATOM_CONFIG_H
31 #define IMPATOM_CONFIG_H
32 
33 #include <IMP/base/base_config.h>
34 #include <string>
35 
36 
37 #ifdef _MSC_VER
38 
39 #ifdef IMPATOM_EXPORTS
40 #define IMPATOMEXPORT __declspec(dllexport)
41 #else // EXPORTS
42 #define IMPATOMEXPORT __declspec(dllimport)
43 #endif // EXPORTS
44 
45 #else // _MSC_VER
46 
47 #ifdef GCC_VISIBILITY
48 #define IMPATOMEXPORT __attribute__ ((visibility("default")))
49 #else // GCC_VISIBILITY
50 #define IMPATOMEXPORT
51 #endif // GCC_VISIBILITY
52 #endif // _MSC_VER
53 
54 #if defined(_MSC_VER) && !defined(SWIG)
55 #ifdef IMPATOM_EXPORTS
56 
57 #define IMPATOM_EXPORT_TEMPLATE(name) template class __declspec(dllexport) name
58 
59 #else //EXPORTS
60 
61 #define IMPATOM_EXPORT_TEMPLATE(name) template class __declspec(dllimport) name
62 
63 #endif // EXPORTS
64 
65 #else // MSC and SWIG
66 #define IMPATOM_EXPORT_TEMPLATE(name) IMP_REQUIRE_SEMICOLON_NAMESPACE
67 
68 #endif // MSC and SWIG
69 
70 #if !defined(SWIG) && !defined(IMP_DOXYGEN)
71 
72 #define IMPATOM_BEGIN_NAMESPACE \
73 IMP_COMPILER_ENABLE_WARNINGS \
74 namespace IMP { namespace atom { \
75 
76 #define IMPATOM_END_NAMESPACE \
77 } } \
78 IMP_COMPILER_DISABLE_WARNINGS
79 
80 #define IMPATOM_BEGIN_INTERNAL_NAMESPACE \
81 IMPATOM_BEGIN_NAMESPACE namespace internal {
82 
83 
84 #define IMPATOM_END_INTERNAL_NAMESPACE \
85 } IMPATOM_END_NAMESPACE
86 
87 #else
88 #define IMPATOM_BEGIN_NAMESPACE \
89 namespace IMP { namespace atom {
90 
91 #define IMPATOM_END_NAMESPACE \
92 } }
93 
94 #define IMPATOM_BEGIN_INTERNAL_NAMESPACE \
95 IMPATOM_BEGIN_NAMESPACE namespace internal {
96 
97 
98 #define IMPATOM_END_INTERNAL_NAMESPACE \
99 } IMPATOM_END_NAMESPACE
100 
101 #endif
102 
103 #define IMP_ATOM_USE_IMP_BASE
104 #define IMP_ATOM_HAS_IMP_BASE 1
105 #define IMP_ATOM_USE_IMP_CGAL
106 #define IMP_ATOM_HAS_IMP_CGAL 1
107 #define IMP_ATOM_USE_IMP_KERNEL
108 #define IMP_ATOM_HAS_IMP_KERNEL 1
109 #define IMP_ATOM_USE_IMP_SCORE_FUNCTOR
110 #define IMP_ATOM_HAS_IMP_SCORE_FUNCTOR 1
111 #define IMP_ATOM_USE_BOOST_PROGRAMOPTIONS
112 #define IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS 1
113 #define IMP_ATOM_USE_BOOST_RANDOM
114 #define IMP_ATOM_HAS_BOOST_RANDOM 1
115 #define IMP_ATOM_USE_BOOST_REGEX
116 #define IMP_ATOM_HAS_BOOST_REGEX 1
117 #define IMP_ATOM_USE_BOOST_SYSTEM
118 #define IMP_ATOM_HAS_BOOST_SYSTEM 1
119 #define IMP_ATOM_USE_CGAL
120 #define IMP_ATOM_HAS_CGAL 1
121 
122 // functions are defined explicitly for swig
123 
124 namespace IMP { namespace atom {
125 /** \name Standard module methods
126  All \imp modules have a set of standard methods to help get information
127  about the module and about files associated with the module.
128  @{
129  */
130 #if !defined(SWIG)
131 IMPATOMEXPORT std::string get_module_version();
132 #endif
133 
134 #if !defined(SWIG)
135 // swig will whine about duplicate definitions of function
136 inline std::string get_module_name() {
137  return "IMP::atom";
138 }
139 #endif
140 
141 } } //namespace
142 
143 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
144 
145 #include <IMP/base/Showable.h>
146 #include <IMP/base/hash.h>
147 
148 namespace IMP { namespace atom {
149 using ::IMP::base::Showable;
150 using ::IMP::base::operator<<;
151 using ::IMP::base::hash_value;
152 } } // namespace
153 namespace IMP { namespace atom { namespace internal {
154 using ::IMP::base::Showable;
155 using ::IMP::base::operator<<;
156 using ::IMP::base::hash_value;
157 } } } // namespace
158 
159 #endif // !defined(SWIG) && !defined(IMP_DOXYGEN)
160 
161 
162 #if !defined(SWIG)
163 
164 namespace IMP { namespace atom {
165 
166 //! Return the full path to installed data
167 /** Each module has its own data directory, so be sure to use
168  the version of this function in the correct module. To read
169  the data file "data_library" that was placed in the \c data
170  directory of module "mymodule", do something like
171  \code
172  std::ifstream in(IMP::mymodule::get_data_path("data_library"));
173  \endcode
174  This will ensure that the code works when \imp is installed or
175  used via the \c tools/imppy.sh script.
176 */
177 IMPATOMEXPORT std::string get_data_path(std::string file_name);
178 
179 //! Return the path to installed example data for this module
180 /** Each module has its own example directory, so be sure to use
181  the version of this function in the correct module. For example
182  to read the file \c example_protein.pdb located in the
183  \c examples directory of the IMP::atom module, do
184  \code
185  IMP::atom::read_pdb(IMP::atom::get_example_path("example_protein.pdb", model));
186  \endcode
187  This will ensure that the code works when \imp is installed or
188  used via the \c tools/imppy.sh script.
189 */
190 IMPATOMEXPORT std::string get_example_path(std::string file_name);
191 /** @} */
192 
193 
194 } } // namespace
195 
196 #endif // SWIG
197 
199 
200 #ifdef IMP_DOXYGEN
201 /** \namespace IMP::atom
202  \brief See \ref IMP_atom_overview "IMP.atom Overview" for more information.
203  */
204 #endif
205 
206 #endif /* IMPATOM_CONFIG_H */