DGtal 0.3.0

Assert.h

Go to the documentation of this file.
00001 
00017 #pragma once
00018 
00031 #if defined(Assert_RECURSES)
00032 #error Recursive header files inclusion detected in Assert.h
00033 #else // defined(Assert_RECURSES)
00034 
00035 #define Assert_RECURSES
00036 
00037 #if !defined Assert_h
00038 
00039 #define Assert_h
00040 
00042 // Inclusions
00043 #include <iostream>
00044 
00045 #include <boost/assert.hpp>
00047 
00048 namespace DGtal 
00049 {
00050   
00056 #define ASSERT(expr) BOOST_ASSERT(expr)
00057 
00058 #define ASSERT2(expr,str) trace.error()<<str<<std::endl; BOOST_ASSERT(expr)
00059 
00060 #if defined(CHECK_ALL_PRE)
00061 #define ASSERT_ALL_PRE(expr) BOOST_ASSERT(expr)
00062 #else // defined(CHECK_ALL_PRE)
00063 #define ASSERT_ALL_PRE(expr)
00064 #endif
00065   
00066 } // namespace DGtal
00067 
00068 
00069 //                                                                           //
00071 
00072 #endif // !defined Assert_h
00073 
00074 #undef Assert_RECURSES
00075 #endif // else defined(Assert_RECURSES)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines