|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
26 #ifndef ConsoleStream_H
27 #define ConsoleStream_H
71 class ConsoleStream :
public std::basic_streambuf<char> {
75 init(stream, textEdit);
109 void init(std::ostream* stream, QTextEdit* textEdit) {
135 std::streamsize
xsputn(
const char* p, std::streamsize n) {
138 std::string::size_type pos = 0;
139 while (pos != std::string::npos) {
141 if (pos != std::string::npos) {
std::streambuf * previousBuffer
Definition: ConsoleStream.h:199
std::ostream * myStream
Definition: ConsoleStream.h:198
std::streamsize xsputn(const char *p, std::streamsize n)
rewriting of the inherited method xsputn
Definition: ConsoleStream.h:181
void setTextEdit(QTextEdit *text_edit)
set the log QTextEdit
Definition: ConsoleStream.h:150
std::string myString
Definition: ConsoleStream.h:200
void init(std::ostream *stream, QTextEdit *textEdit)
initialize ConsoleStream using both input stream and output text edit
Definition: ConsoleStream.h:155
void setStream(std::ostream *stream)
set the value for the buffer to be replaced by the ConsoleStream
Definition: ConsoleStream.h:142
ConsoleStream()
default constructor, init(..) have to be called later, before first use
Definition: ConsoleStream.h:125
~ConsoleStream()
destructor: use free() to restore previous stream output buffer
Definition: ConsoleStream.h:132
QTextEdit * logTextEdit
Definition: ConsoleStream.h:201
int_type overflow(int_type v)
rewriting of the inherited method overflow
Definition: ConsoleStream.h:168
void free()
reset the state as it was before (stream use the old buffer again)
Definition: ConsoleStream.h:161
Definition: Action.cpp:35