19 #ifndef KompexSQLiteCerrRedirection_H
20 #define KompexSQLiteCerrRedirection_H
35 pOutputFile =
new std::ofstream();
63 pOutputFile->open(filename.c_str(), std::ios_base::out);
64 std::streambuf *errbuf = pOutputFile->rdbuf();
65 mBuffer = std::cerr.rdbuf();
66 std::cerr.rdbuf(errbuf);
71 std::cerr.rdbuf(mBuffer);
88 pOutputFile->open(filename.c_str(), std::ios_base::out);
89 std::streambuf *buf = pOutputFile->rdbuf();
90 mBuffer = std::cout.rdbuf();
96 std::cerr.rdbuf(mBuffer);
108 #endif // KompexSQLiteCerrRedirection_H
virtual ~CoutRedirection()
Destrctor.
Definition: KompexSQLiteStreamRedirection.h:94
virtual ~CerrRedirection()
Destrctor.
Definition: KompexSQLiteStreamRedirection.h:69
virtual ~Redirection()
Destrctor.
Definition: KompexSQLiteStreamRedirection.h:38
CoutRedirection & operator=(const CoutRedirection &cr)
Assignment operator.
Definition: KompexSQLiteStreamRedirection.h:103
CoutRedirection(const std::string &filename)
Overloaded constructor.
Definition: KompexSQLiteStreamRedirection.h:86
Redirection & operator=(const Redirection &r)
Assignment operator.
Definition: KompexSQLiteStreamRedirection.h:53
std::cout redirection.
Definition: KompexSQLiteStreamRedirection.h:82
CerrRedirection & operator=(const CerrRedirection &cr)
Assignment operator.
Definition: KompexSQLiteStreamRedirection.h:78
Base-class for std redirections.
Definition: KompexSQLiteStreamRedirection.h:29
#define _SQLiteWrapperExport
Definition: KompexSQLitePrerequisites.h:32
std::streambuf * mBuffer
Stream buffer.
Definition: KompexSQLiteStreamRedirection.h:47
CoutRedirection(const CoutRedirection &cr)
Copy constrctor.
Definition: KompexSQLiteStreamRedirection.h:101
std::ofstream * pOutputFile
File handle.
Definition: KompexSQLiteStreamRedirection.h:45
CerrRedirection(const std::string &filename)
Overloaded constructor.
Definition: KompexSQLiteStreamRedirection.h:61
Redirection()
Standard constructor.
Definition: KompexSQLiteStreamRedirection.h:33
CerrRedirection(const CerrRedirection &cr)
Copy constrctor.
Definition: KompexSQLiteStreamRedirection.h:76
Definition: KompexSQLiteBlob.h:26
std::cerr redirection.
Definition: KompexSQLiteStreamRedirection.h:57