|
DUDS
|
Distributed Update of Data from Something
|
Moves output from an output stream to a TextDisplay one character at a time. More...
#include <TextDisplayStream.hpp>
Public Member Functions | |
| TextDisplayBasicStreambuf (const std::shared_ptr< TextDisplay > &d) | |
| Makes the stream buffer with a display for output. More... | |
| virtual void | clearDisplay () |
| Remove all text from the display and place the cursor in the upper left corner. More... | |
| virtual void | clearTo (unsigned int c, unsigned int r) |
| Clear text from the current cursor position to the given position, inclusive. More... | |
| virtual unsigned int | column () const |
| Returns the cursos's column position. More... | |
| const std::shared_ptr< TextDisplay > & | display () const |
| Returns the output display. More... | |
| virtual void | moveCursor (unsigned int c, unsigned int r) |
| Moves the display's cursor to the given location. More... | |
| virtual unsigned int | row () const |
| Returns the cursos's row position. More... | |
| virtual void | startLine () |
| Moves the cursor to the start of a line clearing text along the way. More... | |
Protected Member Functions | |
| virtual Traits::int_type | overflow (typename Traits::int_type c=Traits::eof()) |
| Writes a character to the display. More... | |
Private Attributes | |
| std::shared_ptr< TextDisplay > | disp |
| The display that will receive the output. More... | |
Moves output from an output stream to a TextDisplay one character at a time.
The characters from the stream are immediately sent to the display. This works well for HD44780 type displays since they need time to process the data and the implementation will relinquish hardware access between characters.
The way this class uses the functions in TextDisplay allows other code to output using TextDisplay directly and interchangeably with this class.
Definition at line 33 of file TextDisplayStream.hpp.
|
inline |
Makes the stream buffer with a display for output.
| d | The display that will take the output. |
Definition at line 75 of file TextDisplayStream.hpp.
|
inlinevirtual |
Remove all text from the display and place the cursor in the upper left corner.
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 110 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::clear(), and duds::hardware::display::TextDisplayBaseStream< Char, Traits >::clearDisplay().
|
inlinevirtual |
Clear text from the current cursor position to the given position, inclusive.
The cursor will be moved to the spot immediately after the given position.
| c | The end column. |
| r | The end row. |
| TextDisplayRangeError | The requested position is beyond the display's boundries. |
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 122 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::TextDisplayBaseStream< Char, Traits >::clearTo().
|
inlinevirtual |
Returns the cursos's column position.
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 87 of file TextDisplayStream.hpp.
|
inline |
Returns the output display.
Definition at line 81 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::TextDisplayBaseStream< Char, Traits >::display().
|
inlinevirtual |
Moves the display's cursor to the given location.
| c | The destination column. |
| r | The destination row. |
| TextDisplayRangeError | The requested position is beyond the display's boundries. |
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 103 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::TextDisplayBaseStream< Char, Traits >::moveCursor().
|
inlineprotectedvirtual |
Writes a character to the display.
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 42 of file TextDisplayStream.hpp.
|
inlinevirtual |
Returns the cursos's row position.
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 93 of file TextDisplayStream.hpp.
|
inlinevirtual |
Moves the cursor to the start of a line clearing text along the way.
If the cursor is already at the start of a line, it will not move and no text will be cleared.
Reimplemented in duds::hardware::display::TextDisplayBasicBufferedStreambuf< Char, Traits >.
Definition at line 130 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::TextDisplayBaseStream< Char, Traits >::startLine(), and duds::hardware::display::startLine().
|
private |
The display that will receive the output.
Definition at line 37 of file TextDisplayStream.hpp.
Referenced by duds::hardware::display::TextDisplayBasicStreambuf< Char, Traits >::display().