OBT_ASSERT.h File Reference

#include "OBT_Exception.h"
#include "OBTTrace.h"

Include dependency graph for OBT_ASSERT.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define OBT_ASSERT(assertion)
#define OBT_DBG_ASSERT(assertion)   OBT_ASSERT( assertion )
#define STATIC_CHECK(expr, msg)   typedef char ERROR_##msg[1][( expr )]


Define Documentation

#define OBT_ASSERT ( assertion   ) 

Value:

if ( !( assertion ) ) \
                                { \
                                std::string assertionMessage( "OBT Assertion Failed : " ) ; \
                                assertionMessage += #assertion ; \
                                TRACE_CRITICAL( assertionMessage.c_str() ) ; \
                                throw OBT::OBT_Exception( assertionMessage.c_str() ) ; \
                                }
throws an exception if the tested assertion failed.

Author:
Michaël Rouillé <michael.rouille@gmail.com>
Before throwing an exception, OBT_ASSERT traces a message labelled with the string representation of the expression which caused the assertion to fail.

Definition at line 15 of file OBT_ASSERT.h.

Referenced by OBT::Plugin::Plugin().

#define OBT_DBG_ASSERT ( assertion   )     OBT_ASSERT( assertion )

throws an exception in debug mode if the tested assertion failed.

Author:
Michaël Rouillé <michael.rouille@gmail.com>
Before throwing an exception, DBG_OBT_ASSERT traces a critical message labelled with the string representation of the expression which caused the assertion to fail.

Definition at line 33 of file OBT_ASSERT.h.

Referenced by OBT::addService(), OBT::AbstractAttribute::initRTTI(), OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >::PrimitiveAttribute(), OBT::RTTI::RTTI(), OBT::TypedAttribute< TOwner, TAttribute >::setValue(), OBT::PrimitiveAttribute< TOwner, TAttribute, typeID >::setValue(), and OBT::TypedAttribute< TOwner, TAttribute >::TypedAttribute().

#define STATIC_CHECK ( expr,
msg   )     typedef char ERROR_##msg[1][( expr )]

Definition at line 39 of file OBT_ASSERT.h.


Generated on Wed Oct 1 10:36:19 2008 for OBT by  doxygen 1.5.3