Generated on Thu Mar 22 10:39:44 2012 for Gecode by doxygen 1.6.3

support.hh

Go to the documentation of this file.
00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
00002 /*
00003  *  Main authors:
00004  *     Christian Schulte <schulte@gecode.org>
00005  *
00006  *  Copyright:
00007  *     Christian Schulte, 2007
00008  *
00009  *  Last modified:
00010  *     $Date: 2011-05-11 12:44:17 +0200 (Wed, 11 May 2011) $ by $Author: tack $
00011  *     $Revision: 12001 $
00012  *
00013  *  This file is part of Gecode, the generic constraint
00014  *  development environment:
00015  *     http://www.gecode.org
00016  *
00017  *  Permission is hereby granted, free of charge, to any person obtaining
00018  *  a copy of this software and associated documentation files (the
00019  *  "Software"), to deal in the Software without restriction, including
00020  *  without limitation the rights to use, copy, modify, merge, publish,
00021  *  distribute, sublicense, and/or sell copies of the Software, and to
00022  *  permit persons to whom the Software is furnished to do so, subject to
00023  *  the following conditions:
00024  *
00025  *  The above copyright notice and this permission notice shall be
00026  *  included in all copies or substantial portions of the Software.
00027  *
00028  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00029  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00030  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00031  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00032  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00033  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00034  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  *
00036  */
00037 
00038 #ifndef __GECODE_SUPPORT_HH__
00039 #define __GECODE_SUPPORT_HH__
00040 
00041 #include <cassert>
00042 
00043 #include <gecode/support/config.hpp>
00044 
00045 /*
00046  * Linking and compiler workarounds
00047  *
00048  */
00049 #if !defined(GECODE_STATIC_LIBS) && \
00050     (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
00051 
00058 #define GECODE_MSC_VIRTUAL virtual
00059 
00060 #ifdef GECODE_BUILD_SUPPORT
00061 #define GECODE_SUPPORT_EXPORT __declspec( dllexport )
00062 #else
00063 #define GECODE_SUPPORT_EXPORT __declspec( dllimport )
00064 #endif
00065 #define GECODE_VTABLE_EXPORT
00066 
00067 #else
00068 
00069 #define GECODE_MSC_VIRTUAL
00070 
00071 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
00072 #define GECODE_SUPPORT_EXPORT __attribute__ ((visibility("default")))
00073 #define GECODE_VTABLE_EXPORT __attribute__ ((visibility("default")))
00074 #else
00075 #define GECODE_SUPPORT_EXPORT
00076 #define GECODE_VTABLE_EXPORT
00077 #endif
00078 
00079 #endif
00080 
00081 // Configure auto-linking
00082 #ifndef GECODE_BUILD_SUPPORT
00083 #define GECODE_LIBRARY_NAME "Support"
00084 #include <gecode/support/auto-link.hpp>
00085 #endif
00086 
00087 // Configure threads
00088 #ifdef GECODE_THREADS_WINDOWS
00089 #define GECODE_HAS_THREADS
00090 #endif
00091 
00092 #ifdef GECODE_THREADS_PTHREADS
00093 #define GECODE_HAS_THREADS
00094 #endif
00095 
00096 
00097 /*
00098  * Basic support needed everywhere
00099  *
00100  */
00101 
00102 #include <gecode/support/macros.hpp>
00103 #include <gecode/support/exception.hpp>
00104 #include <gecode/support/cast.hpp>
00105 #include <gecode/support/heap.hpp>
00106 #include <gecode/support/marked-pointer.hpp>
00107 #include <gecode/support/int-type.hpp>
00108 
00109 /*
00110  * Common datastructures and algorithms
00111  *
00112  */
00113 
00114 #include <gecode/support/bitset-base.hpp>
00115 #include <gecode/support/bitset.hpp>
00116 #include <gecode/support/block-allocator.hpp>
00117 #include <gecode/support/dynamic-array.hpp>
00118 #include <gecode/support/dynamic-queue.hpp>
00119 #include <gecode/support/dynamic-stack.hpp>
00120 #include <gecode/support/random.hpp>
00121 #include <gecode/support/sort.hpp>
00122 #include <gecode/support/static-stack.hpp>
00123 
00124 
00125 /*
00126  * Operating system support
00127  *
00128  */
00129 
00130 #include <gecode/support/thread.hpp>
00131 #include <gecode/support/timer.hpp>
00132 
00133 #endif
00134 
00135 // STATISTICS: support-any