Generated on Wed Jan 24 2018 21:22:26 for Gecode by doxygen 1.8.13
support.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Christian Schulte <schulte@gecode.org>
5  *
6  * Copyright:
7  * Christian Schulte, 2007
8  *
9  * Last modified:
10  * $Date: 2017-01-09 14:28:29 +0100 (Mon, 09 Jan 2017) $ by $Author: schulte $
11  * $Revision: 15362 $
12  *
13  * This file is part of Gecode, the generic constraint
14  * development environment:
15  * http://www.gecode.org
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining
18  * a copy of this software and associated documentation files (the
19  * "Software"), to deal in the Software without restriction, including
20  * without limitation the rights to use, copy, modify, merge, publish,
21  * distribute, sublicense, and/or sell copies of the Software, and to
22  * permit persons to whom the Software is furnished to do so, subject to
23  * the following conditions:
24  *
25  * The above copyright notice and this permission notice shall be
26  * included in all copies or substantial portions of the Software.
27  *
28  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35  *
36  */
37 
38 #ifndef __GECODE_SUPPORT_HH__
39 #define __GECODE_SUPPORT_HH__
40 
41 #include <cassert>
42 
44 
45 /*
46  * Linking and compiler workarounds
47  *
48  */
49 #if !defined(GECODE_STATIC_LIBS) && \
50  (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
51 
58 #define GECODE_MSC_VIRTUAL virtual
59 
60 #ifdef GECODE_BUILD_SUPPORT
61 #define GECODE_SUPPORT_EXPORT __declspec( dllexport )
62 #else
63 #define GECODE_SUPPORT_EXPORT __declspec( dllimport )
64 #endif
65 #define GECODE_VTABLE_EXPORT
66 
67 #else
68 
69 #define GECODE_MSC_VIRTUAL
70 
71 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
72 #define GECODE_SUPPORT_EXPORT __attribute__ ((visibility("default")))
73 #define GECODE_VTABLE_EXPORT __attribute__ ((visibility("default")))
74 #else
75 #define GECODE_SUPPORT_EXPORT
76 #define GECODE_VTABLE_EXPORT
77 #endif
78 
79 #endif
80 
81 // Configure auto-linking
82 #ifndef GECODE_BUILD_SUPPORT
83 #define GECODE_LIBRARY_NAME "Support"
85 #endif
86 
87 // Configure threads
88 #ifdef GECODE_THREADS_WINDOWS
89 #define GECODE_HAS_THREADS
90 #endif
91 
92 #ifdef GECODE_THREADS_PTHREADS
93 #define GECODE_HAS_THREADS
94 #endif
95 
96 
97 /*
98  * Basic support needed everywhere
99  *
100  */
101 
102 #include <gecode/support/macros.hpp>
104 #include <gecode/support/cast.hpp>
105 #include <gecode/support/thread.hpp>
107 #include <gecode/support/heap.hpp>
110 
111 /*
112  * Common datastructures and algorithms
113  *
114  */
115 
117 #include <gecode/support/bitset.hpp>
123 #include <gecode/support/random.hpp>
124 #include <gecode/support/sort.hpp>
126 
127 
128 /*
129  * Operating system support
130  *
131  */
132 
133 #ifdef GECODE_THREADS_WINDOWS
135 #endif
136 #ifdef GECODE_THREADS_PTHREADS
138 #endif
139 #ifndef GECODE_HAS_THREADS
141 #endif
142 
144 
145 #include <gecode/support/timer.hpp>
146 #include <gecode/support/hw-rnd.hpp>
147 
148 /*
149  * Miscellaneous
150  *
151  */
152 
154 
155 #endif
156 
157 // STATISTICS: support-any