9#ifndef MAXOS_COMMON_OUTPUTSTREAM_H
10#define MAXOS_COMMON_OUTPUTSTREAM_H
17namespace MaxOS::common {
53 void write(
string string_to_write)
override;
54 void write(
const char* string_to_write);
57 virtual void write_hex(uint64_t hex_to_write);
96 for(
auto& input_stream_event_handler : this->m_input_stream_event_handlers)
97 input_stream_event_handler->on_stream_read(read_element);
114 for(
auto& input_stream_event_handler : this->m_input_stream_event_handlers)
115 input_stream_event_handler->on_end_of_stream(stream);
150 write(write_element);
A stream that can be written to.
~GenericOutputStream()
Destructor of the GenericOutputStream class.
void on_end_of_stream(GenericInputStream< Type > *) override
Close the stream and remove it from the list of streams when the end of the stream is reached.
virtual GenericOutputStream< Type > & operator<<(Type)
Overload the << operator to write an element to the stream.
void on_stream_read(Type) override
Writes the date that was read from the input stream to the output stream.
GenericOutputStream()
__________________________________________Templates__________________________________________________...
virtual void write(Type)
write an element to the stream.
virtual void close()
Close the stream.
A stream that strings can be written to.
OutputStream()
Constructs an OutputStream object that uses strings as the underlying data type.
virtual void carriage_return()
Writes a carriage return to the output stream.
virtual void write_hex(uint64_t hex_to_write)
Writes a hex to the output stream.
OutputStream & operator<<(string string_to_write) override
Writes a string to the output stream.
virtual void write_int(int int_to_write)
Writes an integer to the output stream.
void write(string string_to_write) override
Writes a string to the output stream.
virtual void write_char(char char_to_write)
Writes a character to the output stream.
virtual void clear()
Clears the output stream.
virtual void line_feed()
Writes a newline to the output stream.
Defines a String class for dynamically sized strings with various operations.