Generated on Wed Nov 1 15:04:42 2006 for Gecode by doxygen 1.4.5

macros.icc

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Christian Schulte <schulte@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Christian Schulte, 2004
00007  *
00008  *  Last modified:
00009  *     $Date: 2006-09-12 10:05:22 +0200 (Tue, 12 Sep 2006) $ by $Author: tack $
00010  *     $Revision: 3658 $
00011  *
00012  *  This file is part of Gecode, the generic constraint
00013  *  development environment:
00014  *     http://www.gecode.org
00015  *
00016  *  See the file "LICENSE" for information on usage and
00017  *  redistribution of this file, and for a
00018  *     DISCLAIMER OF ALL WARRANTIES.
00019  *
00020  */
00021 
00029 #define GECODE_ME_CHECK(me)                     \
00030   if (::Gecode::me_failed(me))                  \
00031     return ::Gecode::ES_FAILED;
00032 
00040 #define GECODE_ME_CHECK_MODIFIED(modified, me) {           \
00041     ModEvent __me__ ## __LINE__ = (me);                    \
00042     if (::Gecode::me_failed(__me__ ## __LINE__))           \
00043       return ::Gecode::ES_FAILED;                          \
00044     modified |= ::Gecode::me_modified(__me__ ## __LINE__); \
00045   }
00046 
00053 #define GECODE_ME_FAIL(home,me)                 \
00054   if (::Gecode::me_failed(me)) {                \
00055     (home)->fail();                             \
00056     return;                                     \
00057   }
00058 
00059 
00060 
00065 #define GECODE_ES_CHECK(es)             \
00066   if ((es) < ::Gecode::ES_OK)           \
00067     return ::Gecode::ES_FAILED;
00068 
00073 #define GECODE_ES_FAIL(home,es)         \
00074   if ((es) < ::Gecode::ES_OK) {         \
00075     (home)->fail();                     \
00076     return;                             \
00077   }
00078 
00088 #if defined(_MSC_VER) && defined(NDEBUG)
00089 
00090 #define GECODE_NEVER __assume(false);
00091 
00092 #else
00093 
00094 #define GECODE_NEVER assert(false);
00095 
00096 #endif
00097 
00098 // STATISTICS: kernel-other