debug.hpp File Reference
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <stdarg.h>
#include "soth/api.hpp"
Include dependency graph for debug.hpp:

Classes

class  soth::sotDebugTrace

Namespaces

namespace  soth

Defines

#define SOTH_DEBUG_MODE   0
#define SOTH_TEMPLATE_DEBUG_MODE   0
#define SOT_COMMON_TRACES
#define sotPREERROR
#define sotDEBUG(level)   if( 1 ) ; else std::cout
#define sotDEBUGMUTE(level)   if( 1 ) ; else std::cout
#define sotERROR   sotERRORFLOW.outputbuffer << sotPREERROR
#define sotDEBUGPRIOR(a)   do {} while(0)
#define sotTDEBUG(level)   if( 1 ) ; else std::cout
#define sotDEBUG_ENABLE(level)   false
#define sotTDEBUG_ENABLE(level)   false
#define sotDEBUGIN(level)   sotDEBUG(level) << "# In {" << std::endl
#define sotDEBUGOUT(level)   sotDEBUG(level) << "# Out }" << std::endl
#define sotDEBUGINOUT(level)   sotDEBUG(level) << "# In/Out { }" << std::endl
#define sotTDEBUGIN(level)   sotTDEBUG(level) << "# In {" << std::endl
#define sotTDEBUGOUT(level)   sotTDEBUG(level) << "# Out }" << std::endl
#define sotTDEBUGINOUT(level)   sotTDEBUG(level) << "# In/Out { }" << std::endl
#define UNUSED(x)   ((void)x)

Functions

void soth::sotDEBUGF (const int, const char *,...)
void soth::sotDEBUGF (const char *,...)
void soth::sotERRORF (const int, const char *,...)
void soth::sotERRORF (const char *,...)
void soth::sotTDEBUGF (const int, const char *,...)
void soth::sotTDEBUGF (const char *,...)

Define Documentation

#define SOT_COMMON_TRACES
Value:
do {  \
        va_list arg; \
        va_start(arg,format); \
        vsnprintf( charbuffer,SIZE,format,arg ); \
        va_end(arg); \
        outputbuffer << tmpbuffer.str() << charbuffer <<std::endl; \
    } while(0)

Referenced by soth::sotDebugTrace::trace(), and soth::sotDebugTrace::traceTemplate().

#define sotDEBUG_ENABLE (   level)    false
#define sotDEBUGINOUT (   level)    sotDEBUG(level) << "# In/Out { }" << std::endl
#define sotDEBUGMUTE (   level)    if( 1 ) ; else std::cout
#define sotDEBUGOUT (   level)    sotDEBUG(level) << "# Out }" << std::endl
#define sotDEBUGPRIOR (   a)    do {} while(0)
#define sotERROR   sotERRORFLOW.outputbuffer << sotPREERROR
#define SOTH_DEBUG_MODE   0
#define SOTH_TEMPLATE_DEBUG_MODE   0
#define sotPREERROR
Value:
"\t!! " << ": " <<__FUNCTION__  \
                            << "(#" << __LINE__ << ") :"
#define sotTDEBUG (   level)    if( 1 ) ; else std::cout
#define sotTDEBUG_ENABLE (   level)    false
#define sotTDEBUGIN (   level)    sotTDEBUG(level) << "# In {" << std::endl
#define sotTDEBUGINOUT (   level)    sotTDEBUG(level) << "# In/Out { }" << std::endl
#define sotTDEBUGOUT (   level)    sotTDEBUG(level) << "# Out }" << std::endl
#define UNUSED (   x)    ((void)x)