00001 #ifndef toast_contracts_hpp_INCLUDED 00002 #define toast_contracts_hpp_INCLUDED 00003 00004 #include <toast/detail/contracts.hpp> 00005 00024 #define TOAST_INVARIANTS() TOAST_INVARIANTS_IMPL() 00025 00033 #define TOAST_IN(condition) TOAST_IN_IMPL(condition, #condition) 00034 00043 #define TOAST_OUT(condition) TOAST_OUT_IMPL(condition, #condition) 00044 00053 #define TOAST_EXCEPT(condition) TOAST_EXCEPT_IMPL(condition, #condition) 00054 00065 #define TOAST_NEW(variable) TOAST_NEW_IMPL(variable) 00066 00072 #define TOAST_INVARIANTS_BEGIN() TOAST_INVARIANTS_BEGIN_IMPL() 00073 00081 #define TOAST_DEFINE_INVARIANT(condition) \ 00082 TOAST_DEFINE_INVARIANT_IMPL(condition) 00083 00089 #define TOAST_INVARIANTS_END() TOAST_INVARIANTS_END_IMPL() 00090 00091 #ifdef NDEBUG 00092 00100 #define TOAST_INVARIANTS_D() 00101 00109 #define TOAST_IN_D(condition) 00110 00118 #define TOAST_OUT_D(condition) 00119 00127 #define TOAST_EXCEPT_D(condition) 00128 00129 #else 00130 00138 #define TOAST_INVARIANTS_D() TOAST_INVARIANTS() 00139 00147 #define TOAST_IN_D(condition) TOAST_IN(condition) 00148 00156 #define TOAST_OUT_D(condition) TOAST_OUT(condition) 00157 00165 #define TOAST_EXCEPT_D(condition) TOAST_EXCEPT(condition) 00166 00167 #endif 00168 00178 #endif // toast_contracts_hpp_INCLUDED