PhoenixDebug
2.0.0
Print/save tools to help debugging C++ programs
Toggle main menu visibility
Loading...
Searching...
No Matches
PDebugAssistant.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 __DEBUG_ASSISTANT_H__
8
#define __DEBUG_ASSISTANT_H__
9
10
#include <fstream>
11
#include <map>
12
13
#include "PStream.h"
14
#include "
phoenix_debug.h
"
15
16
# ifndef DISABLE_DEBUG_ASSISTANT
18
typedef
std::map<PPath, std::ofstream*>
PMapOfstream
;
19
21
typedef
std::map<PPath, PStream*>
PMapBinstream
;
22
24
class
PDebugAssistant
{
25
public
:
26
PDebugAssistant
();
27
virtual
~PDebugAssistant
();
28
29
void
clearTxt
();
30
void
clearBin
();
31
32
std::ofstream &
getTxtFile
(
const
PPath & fileName = PPath(
"default.txt"
));
33
PStream &
getBinFile
(
const
PPath & fileName = PPath(
"default.bin"
));
34
35
36
private
:
38
PMapOfstream
p_mapFileStreamTxt
;
40
PMapBinstream
p_mapBinStream
;
41
};
42
# endif
43
44
45
#endif
46
PMapBinstream
std::map< PPath, PStream * > PMapBinstream
Defines a PMap of PStream (for binary output).
Definition
PDebugAssistant.h:21
PMapOfstream
std::map< PPath, std::ofstream * > PMapOfstream
Defines a PMap of ofstream.
Definition
PDebugAssistant.h:18
PDebugAssistant::p_mapBinStream
PMapBinstream p_mapBinStream
Map of binary stream.
Definition
PDebugAssistant.h:40
PDebugAssistant::getTxtFile
std::ofstream & getTxtFile(const PPath &fileName=PPath("default.txt"))
Returns a file stream for the given file name.
Definition
PDebugAssistant.cpp:44
PDebugAssistant::clearBin
void clearBin()
Clear the file stream Map by closing all the binary files.
Definition
PDebugAssistant.cpp:31
PDebugAssistant::PDebugAssistant
PDebugAssistant()
Constructor of PDebugAssistant.
Definition
PDebugAssistant.cpp:11
PDebugAssistant::getBinFile
PStream & getBinFile(const PPath &fileName=PPath("default.bin"))
Returns a file stream for the given file name.
Definition
PDebugAssistant.cpp:63
PDebugAssistant::clearTxt
void clearTxt()
Clear the file stream Map by closing all the files.
Definition
PDebugAssistant.cpp:21
PDebugAssistant::~PDebugAssistant
virtual ~PDebugAssistant()
Destructor of PDebugAssistant.
Definition
PDebugAssistant.cpp:16
PDebugAssistant::p_mapFileStreamTxt
PMapOfstream p_mapFileStreamTxt
Map of text file streams.
Definition
PDebugAssistant.h:38
phoenix_debug.h
src
PDebugAssistant.h
Generated by
1.17.0