rili::service::ConsoleBase Class Referenceabstract
Inheritance diagram for rili::service::ConsoleBase:
[legend]
Collaboration diagram for rili::service::ConsoleBase:
[legend]

Public Types

enum  OutputMode {
  VT100_16Colors, VT100_216Colors, VT100_RGBColors, WINDOWS_API,
  NONE
}
 

Public Member Functions

virtual void backgroundColor (Color const &color)=0
 
virtual void foregroundColor (Color const &color)=0
 
virtual void defaultBackgroundColor ()=0
 
virtual void defaultForegroundColor ()=0
 
virtual std::pair< std::uint32_t, std::uint32_t > size ()=0
 
virtual void moveCursor (std::uint32_t column, std::uint32_t line)=0
 
virtual void clear ()=0
 
virtual bool outputMode (OutputMode mode)=0
 
- Public Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex const &other)=delete
 
Duplexoperator= (Duplex const &other)=delete
 
- Public Member Functions inherited from rili::stream::Readable
void read (unsigned char *data, std::size_t size)
 
void read (char *data, std::size_t size)
 
void read (unsigned char &c)
 
void read (char &c)
 
virtual void consume (std::size_t size)=0
 
virtual view::Base const & readableView () const =0
 
virtual std::exception_ptr pull (std::size_t count)=0
 
OperationResult operator>> (char &v)
 
OperationResult operator>> (unsigned char &v)
 
OperationResult operator>> (short &v)
 
OperationResult operator>> (unsigned short &v)
 
OperationResult operator>> (long &v)
 
OperationResult operator>> (unsigned long &v)
 
OperationResult operator>> (long long &v)
 
OperationResult operator>> (unsigned long long &v)
 
OperationResult operator>> (int &v)
 
OperationResult operator>> (unsigned int &v)
 
OperationResult operator>> (float &v)
 
OperationResult operator>> (double &v)
 
OperationResult operator>> (bool &v)
 
OperationResult operator>> (void *&v)
 
OperationResult operator>> (std::string &v)
 
OperationResult operator>> (Reader const &fn)
 
- Public Member Functions inherited from rili::stream::Writable
virtual void write (char const *data, std::size_t size)=0
 
virtual std::exception_ptr flush ()=0
 
virtual view::Base const & writableView () const =0
 
void write (unsigned char const *data, std::size_t size)
 
Writableoperator<< (char v)
 
Writableoperator<< (unsigned char v)
 
Writableoperator<< (char const *v)
 
Writableoperator<< (unsigned char const *v)
 
Writableoperator<< (std::string const &v)
 
Writableoperator<< (short v)
 
Writableoperator<< (unsigned short v)
 
Writableoperator<< (long v)
 
Writableoperator<< (unsigned long v)
 
Writableoperator<< (long long v)
 
Writableoperator<< (unsigned long long v)
 
Writableoperator<< (int v)
 
Writableoperator<< (unsigned int v)
 
Writableoperator<< (float v)
 
Writableoperator<< (double v)
 
Writableoperator<< (bool v)
 
Writableoperator<< (void *v)
 
OperationResult operator<< (std::function< OperationResult(Writable &)> const &fn)
 
Writableoperator<< (Writer const &fn)
 

Additional Inherited Members

- Protected Member Functions inherited from rili::stream::Duplex
 Duplex (Duplex &&other)=default
 
Duplexoperator= (Duplex &&other)=default
 

Member Enumeration Documentation

The OutputMode enum used to select output mode. VT100 based will not work on windows, WINDOWS_API may work only on windows. NONE is default mode in which all output formationg is disabled.

Member Function Documentation

virtual void rili::service::ConsoleBase::backgroundColor ( Color const &  color)
pure virtual

backgroundColor set given color as background if avaliable in seleted mode

Parameters
colorused as background color

Implemented in rili::service::Console.

virtual void rili::service::ConsoleBase::clear ( )
pure virtual

clear reset all output painting attributes, clear viewport and move cursor to top left corner

Implemented in rili::service::Console.

virtual void rili::service::ConsoleBase::defaultBackgroundColor ( )
pure virtual

defaultBackgroundColor reset background color to default

Implemented in rili::service::Console.

virtual void rili::service::ConsoleBase::defaultForegroundColor ( )
pure virtual

defaultForegroundColor reset foreground color to default

Implemented in rili::service::Console.

virtual void rili::service::ConsoleBase::foregroundColor ( Color const &  color)
pure virtual

foregroundColor set given color as foreground if avaliable in seleted mode

Parameters
colorused as foreground color

Implemented in rili::service::Console.

virtual void rili::service::ConsoleBase::moveCursor ( std::uint32_t  column,
std::uint32_t  line 
)
pure virtual

moveCursor set move cursor to given position

Parameters
column
line

Implemented in rili::service::Console.

virtual bool rili::service::ConsoleBase::outputMode ( OutputMode  mode)
pure virtual

outputMode try change mode to given one

Parameters
modeused to select mode
Returns
true if mode succesfully changed, otherwise false
virtual std::pair<std::uint32_t, std::uint32_t> rili::service::ConsoleBase::size ( )
pure virtual

size aquire current size of console viewport

Returns
pair containing number of columnts and lines in viewport

Implemented in rili::service::Console.


The documentation for this class was generated from the following file:
  • rili/service/Console.hpp