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