senf::term::AbstractTerminal Struct Referenceabstract

Abstract terminal interface. More...

#include <senf/Utils/Termlib/AbstractTerminal.hh>

Inheritance diagram for senf::term::AbstractTerminal:

Classes

struct  Callbacks
 AbstractTerminal callbacks. More...
 

Public Member Functions

virtual ~AbstractTerminal ()
 
virtual void setCallbacks (Callbacks &cb)=0
 Register terminal callbacks. More...
 
virtual std::string terminalType ()=0
 Get the terminal type. More...
 
virtual unsigned width () const =0
 Get current terminal window width. More...
 
virtual unsigned height () const =0
 Get current terminal window height. More...
 
virtual void write (char ch)=0
 Write character to terminal. More...
 

Detailed Description

Abstract terminal interface.

This abstract interface base class provides an abstract interface to a terminal. There are two parts to this interface:

  • The interface which allows the terminal user to get information about the terminal
  • The interface which allows the terminal to send messages to the terminal user

The first part is implemented by providing abstract virtual members in AbstractTerminal. To allow the terminal to send messages to the terminal user, the terminal user implements the AbstractTerminal::Callbacks interface. The terminal user must register himself with the AbstractTerminal by calling setCallbacks(). Afterwards, the AbstractTerminal implementation will send calls to the terminal user via the AbstractTerminal::Callbacks API.

Definition at line 43 of file AbstractTerminal.hh.

Constructor & Destructor Documentation

◆ ~AbstractTerminal()

virtual senf::term::AbstractTerminal::~AbstractTerminal ( )
inlinevirtual

Definition at line 58 of file AbstractTerminal.hh.

Member Function Documentation

◆ height()

virtual unsigned senf::term::AbstractTerminal::height ( ) const
pure virtual

Get current terminal window height.

Implemented in senf::term::TelnetTerminal.

◆ setCallbacks()

virtual void senf::term::AbstractTerminal::setCallbacks ( Callbacks cb)
pure virtual

Register terminal callbacks.

Implemented in senf::term::TelnetTerminal.

◆ terminalType()

virtual std::string senf::term::AbstractTerminal::terminalType ( )
pure virtual

Get the terminal type.

Implemented in senf::term::TelnetTerminal.

◆ width()

virtual unsigned senf::term::AbstractTerminal::width ( ) const
pure virtual

Get current terminal window width.

Implemented in senf::term::TelnetTerminal.

◆ write()

virtual void senf::term::AbstractTerminal::write ( char  ch)
pure virtual

Write character to terminal.

Implemented in senf::term::TelnetTerminal.


The documentation for this struct was generated from the following file: