All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
debug.hpp File Reference

Header of ... More...

#include <iostream>
#include <openfluid/config.hpp>

Go to the source code of this file.

Macros

#define OFDBG_ENABLED   1
 
#define OFDBG_OUTSTREAM   std::cout
 
#define OFDBG_LOCATE   { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " File " << __FILE__ << ", Line " << __LINE__ << std::endl; }
 
#define OFDBG_BANNER
 
#define OFDBG_MESSAGE(stream)   { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " " << stream << std::endl; }
 
#define OFDBG_UNIT(unitptr)   { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " Unit class " << (unitptr)->getClass() << ", ID " << (unitptr)->getID() << std::endl; }
 
#define OFDBG_UNIT_EXTENDED(unitptr)
 
#define OFDBG_EVENT(eventptr)
 
#define OFDBG_EVENTCOLLECTION(eventcoll)
 

Detailed Description

Header of ...

Author
Jean-Christophe FABRE fabre.nosp@m.jc@s.nosp@m.upagr.nosp@m.o.in.nosp@m.ra.fr

Macro Definition Documentation

#define OFDBG_BANNER
Value:
{ \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << std::endl; \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " OpenFLUID debugging mode is enabled" << std::endl; \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << std::endl; \
}
#define OFDBG_OUTSTREAM
Definition: debug.hpp:54
#define OFDBG_ENABLED   1
#define OFDBG_EVENT (   eventptr)
Value:
{ \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " Event at " << (eventptr)->getDateTime().getAsISOString() << std::endl; \
openfluid::core::Event::EventInfosMap_t::iterator _M_DBG_EvInfoiter; \
for (_M_DBG_EvInfoiter = (eventptr)->getInfos().begin();_M_DBG_EvInfoiter != (eventptr)->getInfos().end();++_M_DBG_EvInfoiter) \
{ \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " - " << (*_M_DBG_EvInfoiter).first << " = " << (*_M_DBG_EvInfoiter).second.get() << std::endl; \
} \
}
#define OFDBG_OUTSTREAM
Definition: debug.hpp:54
#define OFDBG_EVENTCOLLECTION (   eventcoll)
Value:
{ \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " Event collection size : " << eventcoll.getEventsList()->size() << std::endl; \
openfluid::core::EventsList_t::iterator _M_DBG_EvListiter; \
for (_M_DBG_EvListiter=(EvColl.getEventsList())->begin(); _M_DBG_EvListiter != (EvColl.getEventsList())->end(); _M_DBG_EvListiter++) \
{ \
OFDBG_EVENT(&(*_M_DBG_EvListiter)); \
} \
}
#define OFDBG_OUTSTREAM
Definition: debug.hpp:54
#define OFDBG_EVENT(eventptr)
Definition: debug.hpp:163
#define OFDBG_LOCATE   { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " File " << __FILE__ << ", Line " << __LINE__ << std::endl; }
#define OFDBG_MESSAGE (   stream)    { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " " << stream << std::endl; }
#define OFDBG_OUTSTREAM   std::cout
#define OFDBG_UNIT (   unitptr)    { OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " Unit class " << (unitptr)->getClass() << ", ID " << (unitptr)->getID() << std::endl; }
#define OFDBG_UNIT_EXTENDED (   unitptr)
Value:
{ \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " Unit class " << (unitptr)->getClass() << ", ID " << (unitptr)->getID() << std::endl; \
std::vector<openfluid::core::AttributeName_t> _M_DBG_AttrsNames = (unitptr)->getAttributes()->getAttributesNames(); \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " - Attributes: "; \
for (unsigned int i=0; i<_M_DBG_AttrsNames.size();i++) OFDBG_OUTSTREAM << _M_DBG_AttrsNames[i] << " , "; \
OFDBG_OUTSTREAM << std::endl; \
std::vector<openfluid::core::VariableName_t> _M_DBG_VarNames = (unitptr)->getVariables()->getVariablesNames(); \
OFDBG_OUTSTREAM << openfluid::config::DEBUG_PREFIX << " - Variables: "; \
for (unsigned int i=0; i<_M_DBG_VarNames.size();i++) OFDBG_OUTSTREAM << _M_DBG_VarNames[i] << " , "; \
OFDBG_OUTSTREAM << std::endl; \
}
#define OFDBG_OUTSTREAM
Definition: debug.hpp:54