|
BWAPI
|
00001 // Copyright (c) 1997 ETH Zurich (Switzerland). 00002 // All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under 00005 // the terms of the Q Public License version 1.0. 00006 // See the file LICENSE.QPL distributed with CGAL. 00007 // 00008 // Licensees holding a valid commercial license may use this file in 00009 // accordance with the commercial license agreement provided with the software. 00010 // 00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 // 00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/SearchStructures/include/CGAL/Tree_assertions.h $ 00015 // $Id: Tree_assertions.h 44139 2008-07-14 11:16:41Z spion $ 00016 // 00017 // 00018 // Author(s) : Gabriele Neyer 00019 00020 00021 #ifndef CGAL_TREE_ASSERTIONS_H 00022 #define CGAL_TREE_ASSERTIONS_H 00023 00024 # include <CGAL/assertions.h> 00025 00026 00027 // macro definitions 00028 // ================= 00029 // assertions 00030 // ---------- 00031 00032 00033 #if defined(CGAL_TREE_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \ 00034 || defined(NDEBUG) 00035 # define CGAL_Tree_assertion(EX) ((void)0) 00036 # define CGAL_Tree_assertion_msg(EX,MSG) ((void)0) 00037 # define CGAL_Tree_assertion_code(CODE) 00038 #else 00039 # define CGAL_Tree_assertion(EX) \ 00040 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__)) 00041 # define CGAL_Tree_assertion_msg(EX,MSG) \ 00042 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__, MSG)) 00043 # define CGAL_Tree_assertion_code(CODE) CODE 00044 #endif // CGAL_TREE_NO_ASSERTIONS 00045 00046 #if defined(CGAL_TREE_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \ 00047 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00048 || defined(NDEBUG) 00049 # define CGAL_Tree_exactness_assertion(EX) ((void)0) 00050 # define CGAL_Tree_exactness_assertion_msg(EX,MSG) ((void)0) 00051 # define CGAL_Tree_exactness_assertion_code(CODE) 00052 #else 00053 # define CGAL_Tree_exactness_assertion(EX) \ 00054 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__)) 00055 # define CGAL_Tree_exactness_assertion_msg(EX,MSG) \ 00056 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__, MSG)) 00057 # define CGAL_Tree_exactness_assertion_code(CODE) CODE 00058 #endif // CGAL_TREE_NO_ASSERTIONS 00059 00060 #if defined(CGAL_TREE_NO_ASSERTIONS) \ 00061 || defined(CGAL_NO_ASSERTIONS) \ 00062 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00063 || defined(NDEBUG) 00064 # define CGAL_Tree_expensive_assertion(EX) ((void)0) 00065 # define CGAL_Tree_expensive_assertion_msg(EX,MSG) ((void)0) 00066 # define CGAL_Tree_expensive_assertion_code(CODE) 00067 #else 00068 # define CGAL_Tree_expensive_assertion(EX) \ 00069 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__)) 00070 # define CGAL_Tree_expensive_assertion_msg(EX,MSG) \ 00071 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__, MSG)) 00072 # define CGAL_Tree_expensive_assertion_code(CODE) CODE 00073 #endif // CGAL_TREE_NO_ASSERTIONS 00074 00075 #if defined(CGAL_TREE_NO_ASSERTIONS) || defined(CGAL_NO_ASSERTIONS) \ 00076 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00077 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00078 || defined(NDEBUG) 00079 # define CGAL_Tree_expensive_exactness_assertion(EX) ((void)0) 00080 # define CGAL_Tree_expensive_exactness_assertion_msg(EX,MSG) ((void)0) 00081 # define CGAL_Tree_expensive_exactness_assertion_code(CODE) 00082 #else 00083 # define CGAL_Tree_expensive_exactness_assertion(EX) \ 00084 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__)) 00085 # define CGAL_Tree_expensive_exactness_assertion_msg(EX,MSG) \ 00086 (CGAL::possibly(EX)?((void)0):assertion_fail( # EX , __FILE__, __LINE__, MSG)) 00087 # define CGAL_Tree_expensive_exactness_assertion_code(CODE) CODE 00088 #endif // CGAL_TREE_NO_ASSERTIONS 00089 00090 00091 // preconditions 00092 // ------------- 00093 00094 #if defined(CGAL_TREE_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ 00095 || defined(NDEBUG) 00096 # define CGAL_Tree_precondition(EX) ((void)0) 00097 # define CGAL_Tree_precondition_msg(EX,MSG) ((void)0) 00098 # define CGAL_Tree_precondition_code(CODE) 00099 #else 00100 # define CGAL_Tree_precondition(EX) \ 00101 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__)) 00102 # define CGAL_Tree_precondition_msg(EX,MSG) \ 00103 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__, MSG)) 00104 # define CGAL_Tree_precondition_code(CODE) CODE 00105 #endif // CGAL_TREE_NO_PRECONDITIONS 00106 00107 #if defined(CGAL_TREE_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ 00108 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00109 || defined(NDEBUG) 00110 # define CGAL_Tree_exactness_precondition(EX) ((void)0) 00111 # define CGAL_Tree_exactness_precondition_msg(EX,MSG) ((void)0) 00112 # define CGAL_Tree_exactness_precondition_code(CODE) 00113 #else 00114 # define CGAL_Tree_exactness_precondition(EX) \ 00115 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__)) 00116 # define CGAL_Tree_exactness_precondition_msg(EX,MSG) \ 00117 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__, MSG)) 00118 # define CGAL_Tree_exactness_precondition_code(CODE) CODE 00119 #endif // CGAL_TREE_NO_PRECONDITIONS 00120 00121 #if defined(CGAL_TREE_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ 00122 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00123 || defined(NDEBUG) 00124 # define CGAL_Tree_expensive_precondition(EX) ((void)0) 00125 # define CGAL_Tree_expensive_precondition_msg(EX,MSG) ((void)0) 00126 # define CGAL_Tree_expensive_precondition_code(CODE) 00127 #else 00128 # define CGAL_Tree_expensive_precondition(EX) \ 00129 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__)) 00130 # define CGAL_Tree_expensive_precondition_msg(EX,MSG) \ 00131 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__, MSG)) 00132 # define CGAL_Tree_expensive_precondition_code(CODE) CODE 00133 #endif // CGAL_TREE_NO_PRECONDITIONS 00134 00135 #if defined(CGAL_TREE_NO_PRECONDITIONS) || defined(CGAL_NO_PRECONDITIONS) \ 00136 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00137 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00138 || defined(NDEBUG) 00139 # define CGAL_Tree_expensive_exactness_precondition(EX) ((void)0) 00140 # define CGAL_Tree_expensive_exactness_precondition_msg(EX,MSG) ((void)0) 00141 # define CGAL_Tree_expensive_exactness_precondition_code(CODE) 00142 #else 00143 # define CGAL_Tree_expensive_exactness_precondition(EX) \ 00144 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__)) 00145 # define CGAL_Tree_expensive_exactness_precondition_msg(EX,MSG) \ 00146 (CGAL::possibly(EX)?((void)0):precondition_fail( # EX , __FILE__, __LINE__, MSG)) 00147 # define CGAL_Tree_expensive_exactness_precondition_code(CODE) CODE 00148 #endif // CGAL_TREE_NO_PRECONDITIONS 00149 00150 00151 // postconditions 00152 // -------------- 00153 00154 #if defined(CGAL_TREE_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ 00155 || defined(NDEBUG) 00156 # define CGAL_Tree_postcondition(EX) ((void)0) 00157 # define CGAL_Tree_postcondition_msg(EX,MSG) ((void)0) 00158 # define CGAL_Tree_postcondition_code(CODE) 00159 #else 00160 # define CGAL_Tree_postcondition(EX) \ 00161 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__)) 00162 # define CGAL_Tree_postcondition_msg(EX,MSG) \ 00163 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__, MSG)) 00164 # define CGAL_Tree_postcondition_code(CODE) CODE 00165 #endif // CGAL_TREE_NO_POSTCONDITIONS 00166 00167 #if defined(CGAL_TREE_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ 00168 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00169 || defined(NDEBUG) 00170 # define CGAL_Tree_exactness_postcondition(EX) ((void)0) 00171 # define CGAL_Tree_exactness_postcondition_msg(EX,MSG) ((void)0) 00172 # define CGAL_Tree_exactness_postcondition_code(CODE) 00173 #else 00174 # define CGAL_Tree_exactness_postcondition(EX) \ 00175 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__)) 00176 # define CGAL_Tree_exactness_postcondition_msg(EX,MSG) \ 00177 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__, MSG)) 00178 # define CGAL_Tree_exactness_postcondition_code(CODE) CODE 00179 #endif // CGAL_TREE_NO_POSTCONDITIONS 00180 00181 #if defined(CGAL_TREE_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ 00182 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00183 || defined(NDEBUG) 00184 # define CGAL_Tree_expensive_postcondition(EX) ((void)0) 00185 # define CGAL_Tree_expensive_postcondition_msg(EX,MSG) ((void)0) 00186 # define CGAL_Tree_expensive_postcondition_code(CODE) 00187 #else 00188 # define CGAL_Tree_expensive_postcondition(EX) \ 00189 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__)) 00190 # define CGAL_Tree_expensive_postcondition_msg(EX,MSG) \ 00191 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__, MSG)) 00192 # define CGAL_Tree_expensive_postcondition_code(CODE) CODE 00193 #endif // CGAL_TREE_NO_POSTCONDITIONS 00194 00195 #if defined(CGAL_TREE_NO_POSTCONDITIONS) || defined(CGAL_NO_POSTCONDITIONS) \ 00196 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00197 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00198 || defined(NDEBUG) 00199 # define CGAL_Tree_expensive_exactness_postcondition(EX) ((void)0) 00200 # define CGAL_Tree_expensive_exactness_postcondition_msg(EX,MSG) ((void)0) 00201 # define CGAL_Tree_expensive_exactness_postcondition_code(CODE) 00202 #else 00203 # define CGAL_Tree_expensive_exactness_postcondition(EX) \ 00204 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__)) 00205 # define CGAL_Tree_expensive_exactness_postcondition_msg(EX,MSG) \ 00206 (CGAL::possibly(EX)?((void)0):postcondition_fail( # EX , __FILE__, __LINE__, MSG)) 00207 # define CGAL_Tree_expensive_exactness_postcondition_code(CODE) CODE 00208 #endif // CGAL_TREE_NO_POSTCONDITIONS 00209 00210 00211 // warnings 00212 // -------- 00213 00214 #if defined(CGAL_TREE_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ 00215 || defined(NDEBUG) 00216 # define CGAL_Tree_warning(EX) ((void)0) 00217 # define CGAL_Tree_warning_msg(EX,MSG) ((void)0) 00218 # define CGAL_Tree_warning_code(CODE) 00219 #else 00220 # define CGAL_Tree_warning(EX) \ 00221 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__)) 00222 # define CGAL_Tree_warning_msg(EX,MSG) \ 00223 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__, MSG)) 00224 # define CGAL_Tree_warning_code(CODE) CODE 00225 #endif // CGAL_TREE_NO_WARNINGS 00226 00227 #if defined(CGAL_TREE_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ 00228 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00229 || defined(NDEBUG) 00230 # define CGAL_Tree_exactness_warning(EX) ((void)0) 00231 # define CGAL_Tree_exactness_warning_msg(EX,MSG) ((void)0) 00232 # define CGAL_Tree_exactness_warning_code(CODE) 00233 #else 00234 # define CGAL_Tree_exactness_warning(EX) \ 00235 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__)) 00236 # define CGAL_Tree_exactness_warning_msg(EX,MSG) \ 00237 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__, MSG)) 00238 # define CGAL_Tree_exactness_warning_code(CODE) CODE 00239 #endif // CGAL_TREE_NO_WARNINGS 00240 00241 #if defined(CGAL_TREE_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ 00242 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00243 || defined(NDEBUG) 00244 # define CGAL_Tree_expensive_warning(EX) ((void)0) 00245 # define CGAL_Tree_expensive_warning_msg(EX,MSG) ((void)0) 00246 # define CGAL_Tree_expensive_warning_code(CODE) 00247 #else 00248 # define CGAL_Tree_expensive_warning(EX) \ 00249 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__)) 00250 # define CGAL_Tree_expensive_warning_msg(EX,MSG) \ 00251 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__, MSG)) 00252 # define CGAL_Tree_expensive_warning_code(CODE) CODE 00253 #endif // CGAL_TREE_NO_WARNINGS 00254 00255 #if defined(CGAL_TREE_NO_WARNINGS) || defined(CGAL_NO_WARNINGS) \ 00256 || (!defined(CGAL_TREE_CHECK_EXACTNESS) && !defined(CGAL_CHECK_EXACTNESS))\ 00257 || (!defined(CGAL_TREE_CHECK_EXPENSIVE) && !defined(CGAL_CHECK_EXPENSIVE)) \ 00258 || defined(NDEBUG) 00259 # define CGAL_Tree_expensive_exactness_warning(EX) ((void)0) 00260 # define CGAL_Tree_expensive_exactness_warning_msg(EX,MSG) ((void)0) 00261 # define CGAL_Tree_expensive_exactness_warning_code(CODE) 00262 #else 00263 # define CGAL_Tree_expensive_exactness_warning(EX) \ 00264 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__)) 00265 # define CGAL_Tree_expensive_exactness_warning_msg(EX,MSG) \ 00266 (CGAL::possibly(EX)?((void)0):warning_fail( # EX , __FILE__, __LINE__, MSG)) 00267 # define CGAL_Tree_expensive_exactness_warning_code(CODE) CODE 00268 #endif // CGAL_TREE_NO_WARNINGS 00269 00270 00271 #endif
1.7.6.1