main page
modules
namespaces
classes
files
Gecode home
Generated on Sat Feb 7 2015 02:01:29 for Gecode by
doxygen
1.8.9.1
gecode
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: 2013-07-15 02:49:56 +0200 (Mon, 15 Jul 2013) $ by $Author: tack $
11
* $Revision: 13879 $
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
43
#include <
gecode/support/config.hpp
>
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"
84
#include <
gecode/support/auto-link.hpp
>
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
>
103
#include <
gecode/support/exception.hpp
>
104
#include <
gecode/support/cast.hpp
>
105
#include <
gecode/support/thread.hpp
>
106
#include <
gecode/support/heap.hpp
>
107
#include <
gecode/support/marked-pointer.hpp
>
108
#include <
gecode/support/int-type.hpp
>
109
110
/*
111
* Common datastructures and algorithms
112
*
113
*/
114
115
#include <
gecode/support/bitset-base.hpp
>
116
#include <
gecode/support/bitset.hpp
>
117
#include <
gecode/support/bitset-offset.hpp
>
118
#include <
gecode/support/block-allocator.hpp
>
119
#include <
gecode/support/dynamic-array.hpp
>
120
#include <
gecode/support/dynamic-queue.hpp
>
121
#include <
gecode/support/dynamic-stack.hpp
>
122
#include <
gecode/support/random.hpp
>
123
#include <
gecode/support/sort.hpp
>
124
#include <
gecode/support/static-stack.hpp
>
125
126
127
/*
128
* Operating system support
129
*
130
*/
131
132
#ifdef GECODE_THREADS_WINDOWS
133
#include <
gecode/support/thread/windows.hpp
>
134
#endif
135
#ifdef GECODE_THREADS_PTHREADS
136
#include <
gecode/support/thread/pthreads.hpp
>
137
#endif
138
#ifndef GECODE_HAS_THREADS
139
#include <
gecode/support/thread/none.hpp
>
140
#endif
141
142
#include <
gecode/support/thread/thread.hpp
>
143
144
#include <
gecode/support/timer.hpp
>
145
#include <
gecode/support/hw-rnd.hpp
>
146
147
#endif
148
149
// STATISTICS: support-any
macros.hpp
pthreads.hpp
windows.hpp
int-type.hpp
dynamic-stack.hpp
none.hpp
bitset.hpp
marked-pointer.hpp
config.hpp
bitset-base.hpp
hw-rnd.hpp
dynamic-array.hpp
auto-link.hpp
block-allocator.hpp
thread.hpp
heap.hpp
cast.hpp
timer.hpp
thread.hpp
sort.hpp
random.hpp
static-stack.hpp
dynamic-queue.hpp
bitset-offset.hpp
exception.hpp