PhoenixDebug  1.0.0
Tool to ease debugging
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 : CeCILL-C
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
18typedef std::map<PPath, std::ofstream*> PMapOfstream;
19
21typedef std::map<PPath, PStream*> PMapBinstream;
22
25 public:
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:
41};
42# endif
43
44
45#endif
46
std::map< PPath, PStream * > PMapBinstream
Defines a PMap of PStream (for binary output)
std::map< PPath, std::ofstream * > PMapOfstream
Defines a PMap of ofstream.
PMapBinstream p_mapBinStream
Map of binary stream.
std::ofstream & getTxtFile(const PPath &fileName=PPath("default.txt"))
Returns a file stream for the given file name.
void clearBin()
Clear the file stream Map by closing all the binary files.
PDebugAssistant()
Constructor of PDebugAssistant.
PStream & getBinFile(const PPath &fileName=PPath("default.bin"))
Returns a file stream for the given file name.
void clearTxt()
Clear the file stream Map by closing all the files.
virtual ~PDebugAssistant()
Destructor of PDebugAssistant.
PMapOfstream p_mapFileStreamTxt
Map of text file streams.