BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Polygon_2/polygon_assertions.h
Go to the documentation of this file.
00001 // Copyright (c) 1997  Utrecht University (The Netherlands),
00002 // ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
00003 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
00004 // (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
00005 // and Tel-Aviv University (Israel).  All rights reserved.
00006 //
00007 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public License as
00009 // published by the Free Software Foundation; version 2.1 of the License.
00010 // See the file LICENSE.LGPL distributed with CGAL.
00011 //
00012 // Licensees holding a valid commercial license may use this file in
00013 // accordance with the commercial license agreement provided with the software.
00014 //
00015 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 //
00018 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Polygon/include/CGAL/Polygon_2/polygon_assertions.h $
00019 // $Id: polygon_assertions.h 44139 2008-07-14 11:16:41Z spion $
00020 // 
00021 //
00022 // Author(s)     : script by Geert-Jan Giezeman and Sven Schoenherr 
00023 
00024 
00025 // macro definitions
00026 // =================
00027 // assertions
00028 // ----------
00029 
00030 
00031 #if defined(CGAL_POLYGON_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00032   || defined(NDEBUG)
00033 #  define CGAL_polygon_assertion(EX) (static_cast<void>(0))
00034 #  define CGAL_polygon_assertion_msg(EX,MSG) (static_cast<void>(0))
00035 #  define CGAL_polygon_assertion_code(CODE)
00036 #else
00037 #  define CGAL_polygon_assertion(EX) \
00038    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00039 #  define CGAL_polygon_assertion_msg(EX,MSG) \
00040    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00041 #  define CGAL_polygon_assertion_code(CODE) CODE
00042 #endif // CGAL_POLYGON_NO_ASSERTIONS
00043 
00044 #if defined(CGAL_POLYGON_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00045   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00046   || defined(NDEBUG)
00047 #  define CGAL_polygon_exactness_assertion(EX) (static_cast<void>(0))
00048 #  define CGAL_polygon_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
00049 #  define CGAL_polygon_exactness_assertion_code(CODE)
00050 #else
00051 #  define CGAL_polygon_exactness_assertion(EX) \
00052    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00053 #  define CGAL_polygon_exactness_assertion_msg(EX,MSG) \
00054    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00055 #  define CGAL_polygon_exactness_assertion_code(CODE) CODE
00056 #endif // CGAL_POLYGON_NO_ASSERTIONS
00057 
00058 #if defined(CGAL_POLYGON_NO_ASSERTIONS) \
00059   || defined(CGAL_NO_ASSERTIONS) \
00060   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00061   || defined(NDEBUG)
00062 #  define CGAL_polygon_expensive_assertion(EX) (static_cast<void>(0))
00063 #  define CGAL_polygon_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
00064 #  define CGAL_polygon_expensive_assertion_code(CODE)
00065 #else
00066 #  define CGAL_polygon_expensive_assertion(EX) \
00067    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00068 #  define CGAL_polygon_expensive_assertion_msg(EX,MSG) \
00069    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00070 #  define CGAL_polygon_expensive_assertion_code(CODE) CODE
00071 #endif // CGAL_POLYGON_NO_ASSERTIONS
00072 
00073 #if defined(CGAL_POLYGON_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00074   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00075   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00076   || defined(NDEBUG)
00077 #  define CGAL_polygon_expensive_exactness_assertion(EX) (static_cast<void>(0))
00078 #  define CGAL_polygon_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
00079 #  define CGAL_polygon_expensive_exactness_assertion_code(CODE)
00080 #else
00081 #  define CGAL_polygon_expensive_exactness_assertion(EX) \
00082    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00083 #  define CGAL_polygon_expensive_exactness_assertion_msg(EX,MSG) \
00084    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00085 #  define CGAL_polygon_expensive_exactness_assertion_code(CODE) CODE
00086 #endif // CGAL_POLYGON_NO_ASSERTIONS
00087 
00088 
00089 // preconditions
00090 // -------------
00091 
00092 #if defined(CGAL_POLYGON_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00093   || defined(NDEBUG)
00094 #  define CGAL_polygon_precondition(EX) (static_cast<void>(0))
00095 #  define CGAL_polygon_precondition_msg(EX,MSG) (static_cast<void>(0))
00096 #  define CGAL_polygon_precondition_code(CODE)
00097 #else
00098 #  define CGAL_polygon_precondition(EX) \
00099    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00100 #  define CGAL_polygon_precondition_msg(EX,MSG) \
00101    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00102 #  define CGAL_polygon_precondition_code(CODE) CODE
00103 #endif // CGAL_POLYGON_NO_PRECONDITIONS
00104 
00105 #if defined(CGAL_POLYGON_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00106   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00107   || defined(NDEBUG)
00108 #  define CGAL_polygon_exactness_precondition(EX) (static_cast<void>(0))
00109 #  define CGAL_polygon_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
00110 #  define CGAL_polygon_exactness_precondition_code(CODE)
00111 #else
00112 #  define CGAL_polygon_exactness_precondition(EX) \
00113    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00114 #  define CGAL_polygon_exactness_precondition_msg(EX,MSG) \
00115    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00116 #  define CGAL_polygon_exactness_precondition_code(CODE) CODE
00117 #endif // CGAL_POLYGON_NO_PRECONDITIONS
00118 
00119 #if defined(CGAL_POLYGON_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00120   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00121   || defined(NDEBUG)
00122 #  define CGAL_polygon_expensive_precondition(EX) (static_cast<void>(0))
00123 #  define CGAL_polygon_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
00124 #  define CGAL_polygon_expensive_precondition_code(CODE)
00125 #else
00126 #  define CGAL_polygon_expensive_precondition(EX) \
00127    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00128 #  define CGAL_polygon_expensive_precondition_msg(EX,MSG) \
00129    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00130 #  define CGAL_polygon_expensive_precondition_code(CODE) CODE
00131 #endif // CGAL_POLYGON_NO_PRECONDITIONS
00132 
00133 #if defined(CGAL_POLYGON_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00134   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00135   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00136   || defined(NDEBUG)
00137 #  define CGAL_polygon_expensive_exactness_precondition(EX) (static_cast<void>(0))
00138 #  define CGAL_polygon_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
00139 #  define CGAL_polygon_expensive_exactness_precondition_code(CODE)
00140 #else
00141 #  define CGAL_polygon_expensive_exactness_precondition(EX) \
00142    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00143 #  define CGAL_polygon_expensive_exactness_precondition_msg(EX,MSG) \
00144    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00145 #  define CGAL_polygon_expensive_exactness_precondition_code(CODE) CODE
00146 #endif // CGAL_POLYGON_NO_PRECONDITIONS
00147 
00148 
00149 // postconditions
00150 // --------------
00151 
00152 #if defined(CGAL_POLYGON_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00153   || defined(NDEBUG)
00154 #  define CGAL_polygon_postcondition(EX) (static_cast<void>(0))
00155 #  define CGAL_polygon_postcondition_msg(EX,MSG) (static_cast<void>(0))
00156 #  define CGAL_polygon_postcondition_code(CODE)
00157 #else
00158 #  define CGAL_polygon_postcondition(EX) \
00159    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00160 #  define CGAL_polygon_postcondition_msg(EX,MSG) \
00161    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00162 #  define CGAL_polygon_postcondition_code(CODE) CODE
00163 #endif // CGAL_POLYGON_NO_POSTCONDITIONS
00164 
00165 #if defined(CGAL_POLYGON_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00166   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00167   || defined(NDEBUG)
00168 #  define CGAL_polygon_exactness_postcondition(EX) (static_cast<void>(0))
00169 #  define CGAL_polygon_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
00170 #  define CGAL_polygon_exactness_postcondition_code(CODE)
00171 #else
00172 #  define CGAL_polygon_exactness_postcondition(EX) \
00173    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00174 #  define CGAL_polygon_exactness_postcondition_msg(EX,MSG) \
00175    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00176 #  define CGAL_polygon_exactness_postcondition_code(CODE) CODE
00177 #endif // CGAL_POLYGON_NO_POSTCONDITIONS
00178 
00179 #if defined(CGAL_POLYGON_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00180   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00181   || defined(NDEBUG)
00182 #  define CGAL_polygon_expensive_postcondition(EX) (static_cast<void>(0))
00183 #  define CGAL_polygon_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
00184 #  define CGAL_polygon_expensive_postcondition_code(CODE)
00185 #else
00186 #  define CGAL_polygon_expensive_postcondition(EX) \
00187    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00188 #  define CGAL_polygon_expensive_postcondition_msg(EX,MSG) \
00189    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00190 #  define CGAL_polygon_expensive_postcondition_code(CODE) CODE
00191 #endif // CGAL_POLYGON_NO_POSTCONDITIONS
00192 
00193 #if defined(CGAL_POLYGON_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00194   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00195   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00196   || defined(NDEBUG)
00197 #  define CGAL_polygon_expensive_exactness_postcondition(EX) (static_cast<void>(0))
00198 #  define CGAL_polygon_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
00199 #  define CGAL_polygon_expensive_exactness_postcondition_code(CODE)
00200 #else
00201 #  define CGAL_polygon_expensive_exactness_postcondition(EX) \
00202    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00203 #  define CGAL_polygon_expensive_exactness_postcondition_msg(EX,MSG) \
00204    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00205 #  define CGAL_polygon_expensive_exactness_postcondition_code(CODE) CODE
00206 #endif // CGAL_POLYGON_NO_POSTCONDITIONS
00207 
00208 
00209 // warnings
00210 // --------
00211 
00212 #if defined(CGAL_POLYGON_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00213   || defined(NDEBUG)
00214 #  define CGAL_polygon_warning(EX) (static_cast<void>(0))
00215 #  define CGAL_polygon_warning_msg(EX,MSG) (static_cast<void>(0))
00216 #  define CGAL_polygon_warning_code(CODE)
00217 #else
00218 #  define CGAL_polygon_warning(EX) \
00219    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00220 #  define CGAL_polygon_warning_msg(EX,MSG) \
00221    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00222 #  define CGAL_polygon_warning_code(CODE) CODE
00223 #endif // CGAL_POLYGON_NO_WARNINGS
00224 
00225 #if defined(CGAL_POLYGON_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00226   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00227   || defined(NDEBUG)
00228 #  define CGAL_polygon_exactness_warning(EX) (static_cast<void>(0))
00229 #  define CGAL_polygon_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
00230 #  define CGAL_polygon_exactness_warning_code(CODE)
00231 #else
00232 #  define CGAL_polygon_exactness_warning(EX) \
00233    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00234 #  define CGAL_polygon_exactness_warning_msg(EX,MSG) \
00235    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00236 #  define CGAL_polygon_exactness_warning_code(CODE) CODE
00237 #endif // CGAL_POLYGON_NO_WARNINGS
00238 
00239 #if defined(CGAL_POLYGON_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00240   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00241   || defined(NDEBUG)
00242 #  define CGAL_polygon_expensive_warning(EX) (static_cast<void>(0))
00243 #  define CGAL_polygon_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
00244 #  define CGAL_polygon_expensive_warning_code(CODE)
00245 #else
00246 #  define CGAL_polygon_expensive_warning(EX) \
00247    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00248 #  define CGAL_polygon_expensive_warning_msg(EX,MSG) \
00249    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00250 #  define CGAL_polygon_expensive_warning_code(CODE) CODE
00251 #endif // CGAL_POLYGON_NO_WARNINGS
00252 
00253 #if defined(CGAL_POLYGON_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00254   || (!defined(CGAL_POLYGON_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00255   || (!defined(CGAL_POLYGON_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00256   || defined(NDEBUG)
00257 #  define CGAL_polygon_expensive_exactness_warning(EX) (static_cast<void>(0))
00258 #  define CGAL_polygon_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
00259 #  define CGAL_polygon_expensive_exactness_warning_code(CODE)
00260 #else
00261 #  define CGAL_polygon_expensive_exactness_warning(EX) \
00262    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00263 #  define CGAL_polygon_expensive_exactness_warning_msg(EX,MSG) \
00264    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00265 #  define CGAL_polygon_expensive_exactness_warning_code(CODE) CODE
00266 #endif // CGAL_POLYGON_NO_WARNINGS
00267 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines