Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
orxonox::IOConsole Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/command/IOConsolePOSIX.h>

Inheritance diagram for orxonox::IOConsole:
orxonox::Singleton< IOConsole > orxonox::ShellListener

Public Member Functions

 IOConsole ()
 
 ~IOConsole ()
 
void preUpdate (const Clock &time)
 
- Public Member Functions inherited from orxonox::ShellListener
 ShellListener ()=default
 
virtual ~ShellListener ()=default
 

Private Member Functions

virtual void cursorChanged () override
 Called if the position of the cursor in the input-line has changed. More...
 
virtual void executed () override
 Called if a command is about to be executed. More...
 
virtual void exit () override
 Called if the console gets closed. More...
 
void getTerminalSize ()
 
virtual void inputChanged () override
 Called if the text in the input-line has changed. More...
 
virtual void lineAdded () override
 Called if a new output-line was added. More...
 
virtual void linesChanged () override
 Called if all output-lines have to be reprinted. More...
 
void printInputLine ()
 
void printOutputLine (const std::string &line, Shell::LineType type)
 
void printStatusLines ()
 
void setTerminalMode ()
 
bool willPrintStatusLines ()
 

Static Private Member Functions

static int extractLogLevel (std::string *text)
 
static void resetTerminalMode ()
 

Private Attributes

bool bPrintStatusLine_
 
bool bStatusPrinted_
 
InputBufferbuffer_
 
std::ostream cout_
 
int lastTerminalHeight_
 
int lastTerminalWidth_
 
std::ostringstream origCout_
 
termios * originalTerminalSettings_
 
const std::string promptString_
 
Shellshell_
 
int statusLineMaxWidth_
 
std::vector< int > statusLineWidths_
 
int terminalHeight_
 
int terminalWidth_
 

Static Private Attributes

static const int minOutputLines_ = 3
 
static IOConsolesingletonPtr_s = nullptr
 

Friends

class Singleton< IOConsole >
 

Additional Inherited Members

- Static Public Member Functions inherited from orxonox::Singleton< IOConsole >
static bool exists ()
 Tells whether the singleton has been created. More...
 
static IOConsolegetInstance ()
 Returns a reference to the singleton instance. More...
 
- Protected Member Functions inherited from orxonox::Singleton< IOConsole >
 Singleton ()
 Constructor sets the singleton instance pointer. More...
 
virtual ~Singleton ()
 Destructor resets the singleton instance pointer. More...
 

Constructor & Destructor Documentation

orxonox::IOConsole::IOConsole ( )
orxonox::IOConsole::~IOConsole ( )

Member Function Documentation

void orxonox::IOConsole::cursorChanged ( )
overrideprivatevirtual

Called if the position of the cursor in the input-line has changed.

Reimplemented from orxonox::ShellListener.

void orxonox::IOConsole::executed ( )
overrideprivatevirtual

Called if a command is about to be executed.

Reimplemented from orxonox::ShellListener.

void orxonox::IOConsole::exit ( )
overrideprivatevirtual

Called if the console gets closed.

Reimplemented from orxonox::ShellListener.

static int orxonox::IOConsole::extractLogLevel ( std::string *  text)
staticprivate
void orxonox::IOConsole::getTerminalSize ( )
private
void orxonox::IOConsole::inputChanged ( )
overrideprivatevirtual

Called if the text in the input-line has changed.

Reimplemented from orxonox::ShellListener.

void orxonox::IOConsole::lineAdded ( )
overrideprivatevirtual

Called if a new output-line was added.

Reimplemented from orxonox::ShellListener.

void orxonox::IOConsole::linesChanged ( )
overrideprivatevirtual

Called if all output-lines have to be reprinted.

Reimplemented from orxonox::ShellListener.

void orxonox::IOConsole::preUpdate ( const Clock time)
void orxonox::IOConsole::printInputLine ( )
private
void orxonox::IOConsole::printOutputLine ( const std::string &  line,
Shell::LineType  type 
)
private
void orxonox::IOConsole::printStatusLines ( )
private
void orxonox::IOConsole::resetTerminalMode ( )
staticprivate
void orxonox::IOConsole::setTerminalMode ( )
private
bool orxonox::IOConsole::willPrintStatusLines ( )
inlineprivate

Friends And Related Function Documentation

friend class Singleton< IOConsole >
friend

Member Data Documentation

bool orxonox::IOConsole::bPrintStatusLine_
private
bool orxonox::IOConsole::bStatusPrinted_
private
InputBuffer* orxonox::IOConsole::buffer_
private
std::ostream orxonox::IOConsole::cout_
private
int orxonox::IOConsole::lastTerminalHeight_
private
int orxonox::IOConsole::lastTerminalWidth_
private
const int orxonox::IOConsole::minOutputLines_ = 3
staticprivate
std::ostringstream orxonox::IOConsole::origCout_
private
termios* orxonox::IOConsole::originalTerminalSettings_
private
const std::string orxonox::IOConsole::promptString_
private
Shell* orxonox::IOConsole::shell_
private
IOConsole * orxonox::IOConsole::singletonPtr_s = nullptr
staticprivate
int orxonox::IOConsole::statusLineMaxWidth_
private
std::vector<int> orxonox::IOConsole::statusLineWidths_
private
int orxonox::IOConsole::terminalHeight_
private
int orxonox::IOConsole::terminalWidth_
private

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