PhoenixDebug  1.0.0
Tool to ease debugging
Loading...
Searching...
No Matches
phoenix_debug.cpp File Reference
#include "PDebugAssistant.h"
#include "phoenix_debug.h"
+ Include dependency graph for phoenix_debug.cpp:

Go to the source code of this file.

Functions

std::ofstream & pdump (const PPath &fileName)
 Function to dump whatever you want in a text file.
 
PStream & pdumpBin (const PPath &fileName)
 Function to dump whatever you want in a binary file.
 
void pdumpBinClear ()
 Save the currents files and clear the list on files.
 
void pdumpClear ()
 Save the currents files and clear the list on files.
 

Variables

PDebugAssistant GLOB_DEBUG_ASSISTANT
 

Function Documentation

◆ pdump()

std::ofstream & pdump ( const PPath & fileName)

Function to dump whatever you want in a text file.

Parameters
fileName: name of the texte file we want to write
Returns
file to wite

Usage : float * tab = new float[2000lu]; ... for(long unsigned int i(0lu); i < 2000lu; ++i){ pdump("dump.txt") << "i = " << i << ", val = " << tab[i] << endl; } ... delete [] tab;

Definition at line 26 of file phoenix_debug.cpp.

26 {
27 return GLOB_DEBUG_ASSISTANT.getTxtFile(fileName);
28}
PDebugAssistant GLOB_DEBUG_ASSISTANT

References GLOB_DEBUG_ASSISTANT.

◆ pdumpBin()

PStream & pdumpBin ( const PPath & fileName)

Function to dump whatever you want in a binary file.

Parameters
fileName: name of the texte file we want to write
Returns
file to wite

Usage : float * tab = new float[2000lu]; ... for(long unsigned int i(0lu); i < 2000lu; ++i){ pdumpBin("dump.bin") << tab[i]; } ... delete [] tab;

Definition at line 43 of file phoenix_debug.cpp.

43 {
44 return GLOB_DEBUG_ASSISTANT.getBinFile(fileName);
45}

References GLOB_DEBUG_ASSISTANT.

◆ pdumpBinClear()

void pdumpBinClear ( )

Save the currents files and clear the list on files.

Usage : float * tab = new float[2000lu]; ... for(long unsigned int i(0lu); i < 2000lu; ++i){ pdumpBin("dump.bin") << tab[i]; } pdumpBinClear(); //To accelerate the search for the next file to dump for(long unsigned int i(0lu); i < 2000lu; ++i){ pdumpBin("dump2.bin") << tab[i] << endl; } ... delete [] tab;

Definition at line 84 of file phoenix_debug.cpp.

84 {
85#ifndef DISABLE_DEBUG_ASSISTANT
86 GLOB_DEBUG_ASSISTANT.clearBin();
87#endif
88}

References GLOB_DEBUG_ASSISTANT.

◆ pdumpClear()

void pdumpClear ( )

Save the currents files and clear the list on files.

Usage : float * tab = new float[2000lu]; ... for(long unsigned int i(0lu); i < 2000lu; ++i){ pdump("dump.txt") << "i = " << i << ", val = " << tab[i] << endl; } pdumpClear(); //To accelerate the search for the next file to dump for(long unsigned int i(0lu); i < 2000lu; ++i){ pdump("dump2.txt") << "i = " << i << ", val = " << tab[i] << endl; } ... delete [] tab;

Definition at line 64 of file phoenix_debug.cpp.

64 {
65#ifndef DISABLE_DEBUG_ASSISTANT
66 GLOB_DEBUG_ASSISTANT.clearTxt();
67#endif
68}

References GLOB_DEBUG_ASSISTANT.

Variable Documentation

◆ GLOB_DEBUG_ASSISTANT

PDebugAssistant GLOB_DEBUG_ASSISTANT

Definition at line 11 of file phoenix_debug.cpp.

Referenced by pdump(), pdumpBin(), pdumpBinClear(), and pdumpClear().