PhoenixDebug
2.0.0
Print/save tools to help debugging C++ programs
Toggle main menu visibility
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 : LGPL-3.0-only
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
19
std::ofstream &
pdump
(
const
PPath & fileName);
20
PStream &
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
33
void
pdumpClear
();
34
void
pdumpBinClear
();
35
36
#endif
pdumpBin
PStream & pdumpBin(const PPath &fileName)
Function to dump whatever you want in a binary file.
Definition
phoenix_debug.cpp:43
pdumpClear
void pdumpClear()
Save the currents files and clear the list on files.
Definition
phoenix_debug.cpp:64
pdump
std::ofstream & pdump(const PPath &fileName)
Function to dump whatever you want in a text file.
Definition
phoenix_debug.cpp:26
pdumpBinClear
void pdumpBinClear()
Save the currents files and clear the list on files.
Definition
phoenix_debug.cpp:84
src
phoenix_debug.h
Generated by
1.17.0