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