![]() |
Max OS 0.3
|
A stream that can be used to write to a console. More...
#include <console.h>
Public Member Functions | |
| ConsoleStream (Console *) | |
| Construct a new Console Stream object. | |
| void | write_char (char c) override |
| write a character to the console stream | |
| void | set_cursor (uint16_t x, uint16_t y) |
| Set the m_position of the cursor. | |
Public Member Functions inherited from MaxOS::common::OutputStream | |
| OutputStream () | |
| Constructs an OutputStream object that uses strings as the underlying data type. | |
| virtual void | line_feed () |
| Writes a newline to the output stream. | |
| virtual void | carriage_return () |
| Writes a carriage return to the output stream. | |
| virtual void | clear () |
| Clears the output stream. | |
| void | write (string string_to_write) override |
| Writes a string to the output stream. | |
| void | write (const char *string_to_write) |
| Writes a string to the output stream. | |
| virtual void | write_int (int int_to_write) |
| Writes an integer 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. | |
| OutputStream & | operator<< (const char *string_to_write) |
| Writes a string to the output stream. | |
| OutputStream & | operator<< (int int_to_write) |
| Writes a integer to the output stream. | |
| OutputStream & | operator<< (uint64_t hex_to_write) |
| Writes a hexadecimal to the output stream. | |
| OutputStream & | operator<< (char char_to_write) |
| Writes a character to the output stream. | |
Public Member Functions inherited from MaxOS::common::GenericOutputStream< string > | |
| GenericOutputStream () | |
| __________________________________________Templates__________________________________________________/// | |
| ~GenericOutputStream () | |
| Destructor of the GenericOutputStream class. | |
| void | on_stream_read (string) override |
| Writes the date that was read from the input stream to the output stream. | |
| void | on_end_of_stream (GenericInputStream< string > *) override |
| Close the stream and remove it from the list of streams when the end of the stream is reached. | |
| virtual void | write (string) |
| write an element to the stream. | |
| virtual void | close () |
| Close the stream. | |
| virtual GenericOutputStream< string > & | operator<< (string) |
| Overload the << operator to write an element to the stream. | |
Public Member Functions inherited from MaxOS::common::InputStreamProcessor< Type, ProcessorType > | |
| InputStreamProcessor () | |
| Creates a new InputStreamProcessor. | |
| InputStreamProcessor (InputStreamEventHandler< ProcessorType > *generic_stream_event_handler) | |
| Creates a new InputStreamProcessor. | |
| ~InputStreamProcessor () | |
| Destroys the InputStreamProcessor. | |
| void | on_end_of_stream (GenericInputStream< Type > *stream) override |
| Called when a stream has finished. Passes the event on to the handlers and then removes the stream from the array of streams. | |
Public Member Functions inherited from MaxOS::common::InputStreamEventHandler< Type > | |
| InputStreamEventHandler () | |
| _______________________________________________TEMPLATES_________________________________________________________________/// | |
| ~InputStreamEventHandler () | |
| Destroys the InputStreamProcessor and disconnects it from all streams. | |
Public Member Functions inherited from MaxOS::common::GenericInputStream< ProcessorType > | |
| GenericInputStream () | |
| Creates a new GenericInputStream. | |
| GenericInputStream (InputStreamEventHandler< ProcessorType > *) | |
| Creates a new GenericInputStream and connects it to the handler. | |
| ~GenericInputStream () | |
| Destroys the GenericInputStream and disconnects all handlers. | |
| void | connect_input_stream_event_handler (InputStreamEventHandler< ProcessorType > *) |
| Adds a inputStreamEventHandler to the list of internetProtocolHandlers. | |
| void | disconnect_input_stream_event_handler (InputStreamEventHandler< ProcessorType > *) |
| Removes a handler from the list of handlers. | |
Additional Inherited Members | |
Protected Attributes inherited from MaxOS::common::InputStreamEventHandler< Type > | |
| common::Vector< GenericInputStream< Type > * > | m_generic_input_streams |
| List of streams being observed by this handler. | |
Protected Attributes inherited from MaxOS::common::GenericInputStream< ProcessorType > | |
| common::Vector< InputStreamEventHandler< ProcessorType > * > | m_input_stream_event_handlers |
| List of streams being observed by this handler. | |
|
explicit |
Construct a new Console Stream object.
| console | The console to create the stream on |
Definition at line 424 of file console.cpp.
Set the m_position of the cursor.
| x | The x coordinate of the cursor |
| y | The y coordinate of the cursor |
Definition at line 510 of file console.cpp.
Referenced by MaxOS::drivers::console::VESABootConsole::finish().
write a character to the console stream
| c | The character to write |
Reimplemented from MaxOS::common::OutputStream.
Definition at line 436 of file console.cpp.
References MaxOS::drivers::console::Console::height(), MaxOS::common::OutputStream::line_feed(), MaxOS::drivers::console::Console::put_character(), MaxOS::drivers::console::Console::scroll_up(), MaxOS::drivers::console::Console::width(), MaxOS::common::OutputStream::write(), and write_char().
Referenced by write_char().