PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLCore::Console Class Reference

Abstract base class for platform specific 'Console' implementations. More...

#include <Console.h>

Inheritance diagram for PLCore::Console:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void Print (const String &sString) const =0
 Print a string to the console.
virtual int IsKeyHit () const =0
 Checks whether or not there's some keyboard input waiting on the console ('_kbhit()')
virtual int GetCharacter (bool bEcho=false) const =0
 Reads a single character from the console ('_getch()')
virtual void ClearScreen () const =0
 Clears the console screen ('clrscr()')
virtual void GetCursorPosition (uint16 &nX, uint16 &nY) const =0
 Gets the absolute console cursor position ('wherex()' and 'wherey()')
virtual void SetCursorPosition (uint16 nX, uint16 nY) const =0
 Sets the absolute console cursor position ('gotoxy()')

Protected Member Functions

 Console ()
 Constructor.
virtual ~Console ()
 Destructor.

Detailed Description

Abstract base class for platform specific 'Console' implementations.


Constructor & Destructor Documentation

PLCore::Console::Console ( ) [protected]
virtual PLCore::Console::~Console ( ) [protected, virtual]

Destructor.


Member Function Documentation

virtual void PLCore::Console::Print ( const String sString) const [pure virtual]

Print a string to the console.

Parameters:
[in]sStringString that shall be printed

Implemented in PLCore::ConsoleAndroid, PLCore::ConsoleLinux, and PLCore::ConsoleWindows.

virtual int PLCore::Console::IsKeyHit ( ) const [pure virtual]

Checks whether or not there's some keyboard input waiting on the console ('_kbhit()')

Returns:
0 if no key has been pressed, else not null

Implemented in PLCore::ConsoleLinux, and PLCore::ConsoleWindows.

virtual int PLCore::Console::GetCharacter ( bool  bEcho = false) const [pure virtual]

Reads a single character from the console ('_getch()')

Parameters:
[in]bEchoEcho on the console?
Returns:
The read character - note that there's no error code

Implemented in PLCore::ConsoleLinux, and PLCore::ConsoleWindows.

virtual void PLCore::Console::ClearScreen ( ) const [pure virtual]

Clears the console screen ('clrscr()')

Implemented in PLCore::ConsoleLinux, and PLCore::ConsoleWindows.

virtual void PLCore::Console::GetCursorPosition ( uint16 &  nX,
uint16 &  nY 
) const [pure virtual]

Gets the absolute console cursor position ('wherex()' and 'wherey()')

Parameters:
[out]nXReceives the absolute x position of the console cursor, (0,0)=(left,top)
[out]nYReceives the absolute y position of the console cursor, (0,0)=(left,top)

Implemented in PLCore::ConsoleLinux, and PLCore::ConsoleWindows.

virtual void PLCore::Console::SetCursorPosition ( uint16  nX,
uint16  nY 
) const [pure virtual]

Sets the absolute console cursor position ('gotoxy()')

Parameters:
[in]nXNew x absolute position of the console cursor, (0,0)=(left,top)
[in]nYNew y absolute position of the console cursor, (0,0)=(left,top)

Implemented in PLCore::ConsoleLinux, and PLCore::ConsoleWindows.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:16
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported