BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/kernel_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/Kernel_23/include/CGAL/kernel_assertions.h $
00019 // $Id: kernel_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 
00026 // macro definitions
00027 // =================
00028 // assertions
00029 // ----------
00030 
00031 #ifndef CGAL_KERNEL_ASSERTIONS_H
00032 #define CGAL_KERNEL_ASSERTIONS_H
00033 
00034 #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00035   || defined(NDEBUG)
00036 #  define CGAL_kernel_assertion(EX) (static_cast<void>(0))
00037 #  define CGAL_kernel_assertion_msg(EX,MSG) (static_cast<void>(0))
00038 #  define CGAL_kernel_assertion_code(CODE)
00039 #else
00040 #  define CGAL_kernel_assertion(EX) \
00041    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00042 #  define CGAL_kernel_assertion_msg(EX,MSG) \
00043    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00044 #  define CGAL_kernel_assertion_code(CODE) CODE
00045 #  define CGAL_kernel_assertions 1
00046 #endif // CGAL_KERNEL_NO_ASSERTIONS
00047 
00048 #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00049   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00050   || defined(NDEBUG)
00051 #  define CGAL_kernel_exactness_assertion(EX) (static_cast<void>(0))
00052 #  define CGAL_kernel_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
00053 #  define CGAL_kernel_exactness_assertion_code(CODE)
00054 #else
00055 #  define CGAL_kernel_exactness_assertion(EX) \
00056    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00057 #  define CGAL_kernel_exactness_assertion_msg(EX,MSG) \
00058    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00059 #  define CGAL_kernel_exactness_assertion_code(CODE) CODE
00060 #  define CGAL_kernel_exactness_assertions 1
00061 #endif // CGAL_KERNEL_NO_ASSERTIONS
00062 
00063 #if defined(CGAL_KERNEL_NO_ASSERTIONS) \
00064   || defined(CGAL_NO_ASSERTIONS) \
00065   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00066   || defined(NDEBUG)
00067 #  define CGAL_kernel_expensive_assertion(EX) (static_cast<void>(0))
00068 #  define CGAL_kernel_expensive_assertion_msg(EX,MSG) (static_cast<void>(0))
00069 #  define CGAL_kernel_expensive_assertion_code(CODE)
00070 #else
00071 #  define CGAL_kernel_expensive_assertion(EX) \
00072    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00073 #  define CGAL_kernel_expensive_assertion_msg(EX,MSG) \
00074    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00075 #  define CGAL_kernel_expensive_assertion_code(CODE) CODE
00076 #  define CGAL_kernel_expensive_assertions 1
00077 #endif // CGAL_KERNEL_NO_ASSERTIONS
00078 
00079 #if defined(CGAL_KERNEL_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \
00080   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00081   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00082   || defined(NDEBUG)
00083 #  define CGAL_kernel_expensive_exactness_assertion(EX) (static_cast<void>(0))
00084 #  define CGAL_kernel_expensive_exactness_assertion_msg(EX,MSG) (static_cast<void>(0))
00085 #  define CGAL_kernel_expensive_exactness_assertion_code(CODE)
00086 #else
00087 #  define CGAL_kernel_expensive_exactness_assertion(EX) \
00088    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__))
00089 #  define CGAL_kernel_expensive_exactness_assertion_msg(EX,MSG) \
00090    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG))
00091 #  define CGAL_kernel_expensive_exactness_assertion_code(CODE) CODE
00092 #  define CGAL_kernel_expensive_exactness_assertions 1
00093 #endif // CGAL_KERNEL_NO_ASSERTIONS
00094 
00095 
00096 // preconditions
00097 // -------------
00098 
00099 #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00100   || defined(NDEBUG)
00101 #  define CGAL_kernel_precondition(EX) (static_cast<void>(0))
00102 #  define CGAL_kernel_precondition_msg(EX,MSG) (static_cast<void>(0))
00103 #  define CGAL_kernel_precondition_code(CODE)
00104 #else
00105 #  define CGAL_kernel_precondition(EX) \
00106    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00107 #  define CGAL_kernel_precondition_msg(EX,MSG) \
00108    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00109 #  define CGAL_kernel_precondition_code(CODE) CODE
00110 #  define CGAL_kernel_preconditions 1
00111 #endif // CGAL_KERNEL_NO_PRECONDITIONS
00112 
00113 #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00114   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00115   || defined(NDEBUG)
00116 #  define CGAL_kernel_exactness_precondition(EX) (static_cast<void>(0))
00117 #  define CGAL_kernel_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
00118 #  define CGAL_kernel_exactness_precondition_code(CODE)
00119 #else
00120 #  define CGAL_kernel_exactness_precondition(EX) \
00121    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00122 #  define CGAL_kernel_exactness_precondition_msg(EX,MSG) \
00123    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00124 #  define CGAL_kernel_exactness_precondition_code(CODE) CODE
00125 #  define CGAL_kernel_exactness_preconditions 1
00126 #endif // CGAL_KERNEL_NO_PRECONDITIONS
00127 
00128 #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00129   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00130   || defined(NDEBUG)
00131 #  define CGAL_kernel_expensive_precondition(EX) (static_cast<void>(0))
00132 #  define CGAL_kernel_expensive_precondition_msg(EX,MSG) (static_cast<void>(0))
00133 #  define CGAL_kernel_expensive_precondition_code(CODE)
00134 #else
00135 #  define CGAL_kernel_expensive_precondition(EX) \
00136    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00137 #  define CGAL_kernel_expensive_precondition_msg(EX,MSG) \
00138    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00139 #  define CGAL_kernel_expensive_precondition_code(CODE) CODE
00140 #  define CGAL_kernel_expensive_preconditions 1
00141 #endif // CGAL_KERNEL_NO_PRECONDITIONS
00142 
00143 #if defined(CGAL_KERNEL_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \
00144   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00145   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00146   || defined(NDEBUG)
00147 #  define CGAL_kernel_expensive_exactness_precondition(EX) (static_cast<void>(0))
00148 #  define CGAL_kernel_expensive_exactness_precondition_msg(EX,MSG) (static_cast<void>(0))
00149 #  define CGAL_kernel_expensive_exactness_precondition_code(CODE)
00150 #else
00151 #  define CGAL_kernel_expensive_exactness_precondition(EX) \
00152    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__))
00153 #  define CGAL_kernel_expensive_exactness_precondition_msg(EX,MSG) \
00154    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::precondition_fail( # EX , __FILE__, __LINE__, MSG))
00155 #  define CGAL_kernel_expensive_exactness_precondition_code(CODE) CODE
00156 #  define CGAL_kernel_expensive_exactness_preconditions 1
00157 #endif // CGAL_KERNEL_NO_PRECONDITIONS
00158 
00159 
00160 // postconditions
00161 // --------------
00162 
00163 #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00164   || defined(NDEBUG)
00165 #  define CGAL_kernel_postcondition(EX) (static_cast<void>(0))
00166 #  define CGAL_kernel_postcondition_msg(EX,MSG) (static_cast<void>(0))
00167 #  define CGAL_kernel_postcondition_code(CODE)
00168 #else
00169 #  define CGAL_kernel_postcondition(EX) \
00170    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00171 #  define CGAL_kernel_postcondition_msg(EX,MSG) \
00172    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00173 #  define CGAL_kernel_postcondition_code(CODE) CODE
00174 #  define CGAL_kernel_postconditions 1
00175 #endif // CGAL_KERNEL_NO_POSTCONDITIONS
00176 
00177 #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00178   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00179   || defined(NDEBUG)
00180 #  define CGAL_kernel_exactness_postcondition(EX) (static_cast<void>(0))
00181 #  define CGAL_kernel_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
00182 #  define CGAL_kernel_exactness_postcondition_code(CODE)
00183 #else
00184 #  define CGAL_kernel_exactness_postcondition(EX) \
00185    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00186 #  define CGAL_kernel_exactness_postcondition_msg(EX,MSG) \
00187    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00188 #  define CGAL_kernel_exactness_postcondition_code(CODE) CODE
00189 #  define CGAL_kernel_exactness_postconditions 1
00190 #endif // CGAL_KERNEL_NO_POSTCONDITIONS
00191 
00192 #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00193   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00194   || defined(NDEBUG)
00195 #  define CGAL_kernel_expensive_postcondition(EX) (static_cast<void>(0))
00196 #  define CGAL_kernel_expensive_postcondition_msg(EX,MSG) (static_cast<void>(0))
00197 #  define CGAL_kernel_expensive_postcondition_code(CODE)
00198 #else
00199 #  define CGAL_kernel_expensive_postcondition(EX) \
00200    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00201 #  define CGAL_kernel_expensive_postcondition_msg(EX,MSG) \
00202    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00203 #  define CGAL_kernel_expensive_postcondition_code(CODE) CODE
00204 #  define CGAL_kernel_expensive_postconditions 1
00205 #endif // CGAL_KERNEL_NO_POSTCONDITIONS
00206 
00207 #if defined(CGAL_KERNEL_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \
00208   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00209   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00210   || defined(NDEBUG)
00211 #  define CGAL_kernel_expensive_exactness_postcondition(EX) (static_cast<void>(0))
00212 #  define CGAL_kernel_expensive_exactness_postcondition_msg(EX,MSG) (static_cast<void>(0))
00213 #  define CGAL_kernel_expensive_exactness_postcondition_code(CODE)
00214 #else
00215 #  define CGAL_kernel_expensive_exactness_postcondition(EX) \
00216    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__))
00217 #  define CGAL_kernel_expensive_exactness_postcondition_msg(EX,MSG) \
00218    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::postcondition_fail( # EX , __FILE__, __LINE__, MSG))
00219 #  define CGAL_kernel_expensive_exactness_postcondition_code(CODE) CODE
00220 #  define CGAL_kernel_expensive_exactness_postconditions 1
00221 #endif // CGAL_KERNEL_NO_POSTCONDITIONS
00222 
00223 
00224 // warnings
00225 // --------
00226 
00227 #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00228   || defined(NDEBUG)
00229 #  define CGAL_kernel_warning(EX) (static_cast<void>(0))
00230 #  define CGAL_kernel_warning_msg(EX,MSG) (static_cast<void>(0))
00231 #  define CGAL_kernel_warning_code(CODE)
00232 #else
00233 #  define CGAL_kernel_warning(EX) \
00234    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00235 #  define CGAL_kernel_warning_msg(EX,MSG) \
00236    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00237 #  define CGAL_kernel_warning_code(CODE) CODE
00238 #  define CGAL_kernel_warnings 1
00239 #endif // CGAL_KERNEL_NO_WARNINGS
00240 
00241 #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00242   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00243   || defined(NDEBUG)
00244 #  define CGAL_kernel_exactness_warning(EX) (static_cast<void>(0))
00245 #  define CGAL_kernel_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
00246 #  define CGAL_kernel_exactness_warning_code(CODE)
00247 #else
00248 #  define CGAL_kernel_exactness_warning(EX) \
00249    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00250 #  define CGAL_kernel_exactness_warning_msg(EX,MSG) \
00251    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00252 #  define CGAL_kernel_exactness_warning_code(CODE) CODE
00253 #  define CGAL_kernel_exactness_warnings 1
00254 #endif // CGAL_KERNEL_NO_WARNINGS
00255 
00256 #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00257   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00258   || defined(NDEBUG)
00259 #  define CGAL_kernel_expensive_warning(EX) (static_cast<void>(0))
00260 #  define CGAL_kernel_expensive_warning_msg(EX,MSG) (static_cast<void>(0))
00261 #  define CGAL_kernel_expensive_warning_code(CODE)
00262 #else
00263 #  define CGAL_kernel_expensive_warning(EX) \
00264    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00265 #  define CGAL_kernel_expensive_warning_msg(EX,MSG) \
00266    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00267 #  define CGAL_kernel_expensive_warning_code(CODE) CODE
00268 #  define CGAL_kernel_expensive_warnings 1
00269 #endif // CGAL_KERNEL_NO_WARNINGS
00270 
00271 #if defined(CGAL_KERNEL_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \
00272   || (!defined(CGAL_KERNEL_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\
00273   || (!defined(CGAL_KERNEL_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \
00274   || defined(NDEBUG)
00275 #  define CGAL_kernel_expensive_exactness_warning(EX) (static_cast<void>(0))
00276 #  define CGAL_kernel_expensive_exactness_warning_msg(EX,MSG) (static_cast<void>(0))
00277 #  define CGAL_kernel_expensive_exactness_warning_code(CODE)
00278 #else
00279 #  define CGAL_kernel_expensive_exactness_warning(EX) \
00280    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__))
00281 #  define CGAL_kernel_expensive_exactness_warning_msg(EX,MSG) \
00282    (CGAL::possibly(EX)?(static_cast<void>(0)): ::CGAL::warning_fail( # EX , __FILE__, __LINE__, MSG))
00283 #  define CGAL_kernel_expensive_exactness_warning_code(CODE) CODE
00284 #  define CGAL_kernel_expensive_exactness_warnings 1
00285 #endif // CGAL_KERNEL_NO_WARNINGS
00286 
00287 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines