BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Protected Member Functions
BeeeOn::ConsoleSessionImpl Class Referenceabstract

#include <Console.h>

Inheritance diagram for BeeeOn::ConsoleSessionImpl:
BeeeOn::Console::ClosedConsoleSessionImpl BeeeOn::StreamConsoleSessionImpl BeeeOn::TCPConsoleSessionImpl

Public Types

typedef Poco::SharedPtr
< ConsoleSessionImpl
Ptr
 

Public Member Functions

virtual std::string readUntil (const char c)=0
 
virtual std::string readBytes (const unsigned int length)=0
 
virtual void print (const std::string &text, bool newline=true)=0
 
virtual bool eof ()
 

Protected Member Functions

std::string iosReadUntil (std::istream &in, const char c)
 
std::string iosReadBytes (std::istream &in, const unsigned int length)
 
void iosPrint (std::ostream &out, const std::string &text, bool newline)
 

Detailed Description

Implementation specific console session. The session can represent a user that has logged into the system, an open socket or some other context.

Member Function Documentation

bool ConsoleSessionImpl::eof ( )
virtual

Return true if the session cannot read any data anymore.

Reimplemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.

void ConsoleSessionImpl::iosPrint ( std::ostream &  out,
const std::string &  text,
bool  newline 
)
protected

Implementation of the print for std::ostream.

string ConsoleSessionImpl::iosReadBytes ( std::istream &  in,
const unsigned int  length 
)
protected

Implementation of the readBytes for std::istream.

string ConsoleSessionImpl::iosReadUntil ( std::istream &  in,
const char  c 
)
protected

Implementation of the readUntil for std::istream.

virtual void BeeeOn::ConsoleSessionImpl::print ( const std::string &  text,
bool  newline = true 
)
pure virtual

Print the given string. The newline can be optionally appended.

Implemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.

virtual std::string BeeeOn::ConsoleSessionImpl::readBytes ( const unsigned int  length)
pure virtual
virtual std::string BeeeOn::ConsoleSessionImpl::readUntil ( const char  c)
pure virtual

Read and return data until the character c is reached.

Implemented in BeeeOn::Console::ClosedConsoleSessionImpl, BeeeOn::TCPConsoleSessionImpl, and BeeeOn::StreamConsoleSessionImpl.


The documentation for this class was generated from the following files: