TextStream implemented but the print() function isnt used correctly

This commit is contained in:
Simon
2025-04-22 15:57:22 +02:00
parent 7670ffdf42
commit d4f5a4780c
3 changed files with 16 additions and 5 deletions

View File

@@ -14,4 +14,12 @@ TextStream::TextStream(unsigned from_col,
{}
void TextStream::flush() {}
void TextStream::flush() {
for (unsigned i=0; i <= pos; i++) {
//print(buffer[i]);
}
pos = 0;
}

View File

@@ -8,7 +8,8 @@
#pragma once
#include "../types.h"
#include "../object/outputstream.h"
#include "../arch/textwindow.h"
/*! \brief Output text (form different data type sources) on screen in text
* mode
* \ingroup io
@@ -19,7 +20,7 @@
* \ref TextWindow and only implements the method \ref TextStream::flush().
* Further formatting or special effects are implemented in \ref TextWindow.
*/
class TextStream {
class TextStream: public OutputStream, protected TextWindow {
// Prevent copies and assignments
TextStream(const TextStream&) = delete;
TextStream& operator=(const TextStream&) = delete;