Tracer  v0.0.1
A platform independant stack trace generator
cPrinters.cpp File Reference
#include "defines.hpp"
#include "tracer.h"
#include "tracerInternal.hpp"
#include <string.h>
+ Include dependency graph for cPrinters.cpp:

Go to the source code of this file.

Macros

#define PRINTER_CASTER(Target)
 Makes sure that the printer can be casted and sets cOK. More...
 

Functions

void tr_Printer__genStringPreFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringPreFrame.
 
void tr_Printer__genStringForFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringForFrame.
 
void tr_Printer__genStringPostFrame (tr_Printer_t *p, size_t frameNum, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::genStringPostFrame.
 
void tr_Printer__generateString (tr_Printer_t *p, char **outStr, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::generateString.
 
void tr_Printer__printToFile (tr_Printer_t *p, const char *file, TR_BOOL_t append, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToFile.
 
void tr_Printer__printToStdOut (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToStdOut.
 
void tr_Printer__printToStdErr (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::printToStdErr.
 
void tr_Printer__enableColor (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::enableColor.
 
void tr_Printer__disableColor (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::disableColor.
 
void tr_Printer__setTrace (tr_Printer_t *p, tr_Tracer_t *t, TR_BOOL_t *castOK)
 Wrapper for tracer::AbstractPrinter::setTrace.
 
tr_DefaultPrinter_Config_t tr_Printer__getConfig (tr_Printer_t *p, TR_BOOL_t *castOK)
 Wrapper for tracer::DefaultPrinter::getConfig.
 
void tr_Printer__setConfig (tr_Printer_t *p, tr_DefaultPrinter_Config_t cfg, TR_BOOL_t *castOK)
 Wrapper for tracer::DefaultPrinter::setConfig.
 
void tr_Printer__setSignum (tr_Printer_t *p, int signum, TR_BOOL_t *castOK)
 Wrapper for tracer::SystemInfoPrinter::setSignum.
 
void tr_Printer__addSystemEntry (tr_Printer_t *p, const char *name, const char *value, TR_BOOL_t *castOK)
 Wrapper for tracer::SystemInfoPrinter::addSystemEntry.
 

Macro Definition Documentation

◆ PRINTER_CASTER

#define PRINTER_CASTER (   Target)
Value:
TR_BOOL_t localCastOK = TR_TRUE; \
if (!castOK) \
castOK = &localCastOK; \
\
TR_BOOL_t &cOK = *castOK; \
\
cOK = TR_FALSE; \
Target *printer = nullptr; \
if (p) { \
printer = dynamic_cast<Target *>(p->obj.get()); \
if (printer) { \
cOK = TR_TRUE; \
} \
}
enum TR_BOOL TR_BOOL_t
Define some our own boolean values.
Definition: tracer.h:58

Makes sure that the printer can be casted and sets cOK.

Definition at line 34 of file cPrinters.cpp.