PhoenixDebug  1.0.0
Tool to ease debugging
Loading...
Searching...
No Matches
phoenix_debug.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7#ifndef __PHOENIX_DEBUG_H__
8#define __PHOENIX_DEBUG_H__
9
10#include <string>
11#include <fstream>
12#include <iostream>
13#include "PStream.h"
14#include "PPath.h"
15
16// #define DISABLE_DEBUG_ASSISTANT
17
18#ifndef DISABLE_DEBUG_ASSISTANT
19std::ofstream & pdump(const PPath & fileName);
20PStream & pdumpBin(const PPath & fileName);
21#else
22# define pdump(X) std::cerr << (X) << " "
23# define pdumpBin(X)
24#endif
25
26#ifdef PHOENIXLOG
27# define PLOG(X, Y) pdump(X) << __FILE__ << ":" << __LINE__ << " : " << Y << std::endl;
28#else
29// # define PLOG(X, Y) / ## / //Let's define some comment
30# define PLOG(X, Y)
31#endif
32
33void pdumpClear();
34void pdumpBinClear();
35
36#endif
PStream & pdumpBin(const PPath &fileName)
Function to dump whatever you want in a binary file.
void pdumpClear()
Save the currents files and clear the list on files.
std::ofstream & pdump(const PPath &fileName)
Function to dump whatever you want in a text file.
void pdumpBinClear()
Save the currents files and clear the list on files.