All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
include/roboptim/core/debug.hh File Reference
#include <sstream>
#include <boost/config.hpp>
#include <boost/current_function.hpp>
#include <log4cxx/logger.h>
#include <roboptim/core/indent.hh>

Namespaces

namespace  roboptim
 defined(EIGEN_RUNTIME_NO_MALLOC) && !defined(ROBOPTIM_DO_NOT_CHECK_ALLOCATION)
 

Macros

#define ROBOPTIM_ASSERT_INTERNAL(expr)
 
#define ROBOPTIM_ASSERT_MSG_INTERNAL(expr, msg)
 
#define ROBOPTIM_ASSERT(expr)   ROBOPTIM_ASSERT_INTERNAL(expr)
 
#define ROBOPTIM_ASSERT_MSG(expr, msg)   ROBOPTIM_ASSERT_MSG_INTERNAL(expr, msg)
 
#define RoboptimCoreDebug(STATEMENT)
 
#define RoboptimCoreDout(cntrl, data)
 
#define RoboptimCoreDoutFatal(cntrl, data)
 
#define RoboptimCoreForAllDebugChannels(STATEMENT)
 
#define RoboptimCoreForAllDebugObjects(STATEMENT)
 
#define ROBOPTIM_DEBUG_ONLY(X)   X
 

Functions

ROBOPTIM_CORE_DLLAPI void roboptim::assertion_failed (char const *expr, char const *function, char const *file, long line)
 Handler called when an insertion fails. More...
 
ROBOPTIM_CORE_DLLAPI void roboptim::assertion_failed_msg (char const *expr, char const *msg, char const *function, char const *file, long line)
 Handler called when an insertion fails, with an extra error message. More...
 

Macro Definition Documentation

#define ROBOPTIM_ASSERT (   expr)    ROBOPTIM_ASSERT_INTERNAL(expr)
#define ROBOPTIM_ASSERT_INTERNAL (   expr)
Value:
(BOOST_LIKELY(!!(expr)) ? ((void)0) : ::roboptim::assertion_failed( \
#expr, BOOST_CURRENT_FUNCTION, \
__FILE__, __LINE__))
#define ROBOPTIM_ASSERT_MSG_INTERNAL (   expr,
  msg 
)
Value:
(BOOST_LIKELY(!!(expr)) \
? ((void)0) \
#expr, \
((std::ostringstream &)(std::stringstream().flush() << msg)) \
.str() \
.c_str(), \
BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
#define ROBOPTIM_DEBUG_ONLY (   X)    X
#define RoboptimCoreDebug (   STATEMENT)
Value:
LOG4CXX_DEBUG(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMENT)
#define RoboptimCoreDout (   cntrl,
  data 
)
Value:
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
data)
#define RoboptimCoreDoutFatal (   cntrl,
  data 
)
Value:
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
data)
#define RoboptimCoreForAllDebugChannels (   STATEMENT)
Value:
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMEMT)
#define RoboptimCoreForAllDebugObjects (   STATEMENT)
Value:
LOG4CXX_INFO(log4cxx::Logger::getLogger("roboptim.core"), \
STATEMENT)