CLI
2.9
|
Generic output device. More...
#include <io_device.h>
Classes | |
class | ScreenInfo |
Screen information. More... | |
Public Member Functions | |
const tk::String | GetDebugName (void) const |
Debug name accessor. More... | |
const int | UseInstance (const CallInfo &CLI_CallInfo) |
Ensures instance validity. More... | |
const int | FreeInstance (const CallInfo &CLI_CallInfo) |
Releases the instance. More... | |
const int | GetInstanceUsers (void) const |
Instance user count accessor. More... | |
const bool | OpenUp (const CallInfo &CLI_CallInfo) |
Checks the device is opened. More... | |
const bool | CloseDown (const CallInfo &CLI_CallInfo) |
Indicates the device the client does not need the device to opened anymore. More... | |
const int | GetOpenUsers (void) const |
Open state user count accessor. More... | |
const OutputDevice & | operator<< (const std::string &STR_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const tk::String &STR_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const char *const STR_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const char C_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const KEY E_Key) const |
Output operator. More... | |
const OutputDevice & | operator<< (const uint8_t UI8_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const int16_t I16_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const uint16_t UI16_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const int32_t I32_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const uint32_t UI32_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const int64_t I64_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const uint64_t UI64_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const float F_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const double D_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const void *const PV_Out) const |
Output operator. More... | |
const OutputDevice & | operator<< (const IOEndl &CLI_IOEndl) const |
Output operator. More... | |
const ResourceString | GetLastError (void) const |
Last error accessor. More... | |
virtual void | PutString (const char *const STR_Out) const =0 |
Output handler. More... | |
virtual void | Beep (void) const |
Beep handler. More... | |
virtual void | CleanScreen (void) const |
Clean screen. More... | |
virtual const ScreenInfo | GetScreenInfo (void) const |
Screen info accessor. More... | |
virtual const bool | WouldOutput (const OutputDevice &CLI_Device) const |
Stack overflow protection. More... | |
Public Member Functions inherited from Object | |
virtual | ~Object (void)=0 |
Pure virtual destructor. More... | |
Static Public Member Functions | |
static OutputDevice & | GetNullDevice (void) |
Null device singleton. More... | |
static OutputDevice & | GetStdOut (void) |
Standard output device singleton. More... | |
static OutputDevice & | GetStdErr (void) |
Standard error device singleton. More... | |
Protected Member Functions | |
OutputDevice (const char *const STR_DbgName, const bool B_AutoDelete) | |
Constructor. More... | |
virtual | ~OutputDevice (void) |
Destructor. More... | |
virtual const bool | OpenDevice (void)=0 |
Device opening handler. More... | |
virtual const bool | CloseDevice (void)=0 |
Device closure handler. More... | |
Protected Member Functions inherited from Object | |
Object (void) | |
Default constructor only available to sub-classes. More... | |
Protected Attributes | |
ResourceString | m_cliLastError |
|
explicitprotected |
Constructor.
STR_DbgName | Debug name. Useful for traces only. |
B_AutoDelete | Auto-deletion flag. |
|
protectedvirtual |
Destructor.
|
virtual |
Beep handler.
Reimplemented in TelnetConnection, OutputFileDevice, InputFileDevice, IOMux, SingleCommand, Console, Text, and StringDevice.
|
virtual |
Clean screen.
Reimplemented in TelnetConnection, InputFileDevice, IOMux, SingleCommand, Console, Text, and StringDevice.
|
protectedpure virtual |
Device closure handler.
Implemented in TelnetConnection, OutputFileDevice, InputFileDevice, IOMux, SingleCommand, StringDevice, Text, and Console.
const bool OutputDevice::CloseDown | ( | const CallInfo & | CLI_CallInfo | ) |
Indicates the device the client does not need the device to opened anymore.
Releases the lock on the open state. When no more user need the device to be opened, it is closed straight forward.
CLI_CallInfo | Call information. |
const int OutputDevice::FreeInstance | ( | const CallInfo & | CLI_CallInfo | ) |
Releases the instance.
If the auto-deletion flag has been set during construction, the object is auto-deleted when the number of users reaches 0 on this call.
CLI_CallInfo | Call information. |
const tk::String OutputDevice::GetDebugName | ( | void | ) | const |
Debug name accessor.
const int OutputDevice::GetInstanceUsers | ( | void | ) | const |
Instance user count accessor.
const ResourceString OutputDevice::GetLastError | ( | void | ) | const |
Last error accessor.
|
static |
Null device singleton.
Referenced by Text::LineDown(), and Password::OnKey().
const int OutputDevice::GetOpenUsers | ( | void | ) | const |
Open state user count accessor.
|
virtual |
Screen info accessor.
Reimplemented in Console.
Referenced by More::OnKey(), Less::ResetToDefault(), and More::ResetToDefault().
|
static |
Standard error device singleton.
|
static |
Standard output device singleton.
|
protectedpure virtual |
Device opening handler.
Implemented in TelnetConnection, OutputFileDevice, InputFileDevice, IOMux, SingleCommand, Text, StringDevice, and Console.
const bool OutputDevice::OpenUp | ( | const CallInfo & | CLI_CallInfo | ) |
Checks the device is opened.
Opens the device if not already opened. Acquire a lock on the open state in any case.
CLI_CallInfo | Call information. |
const OutputDevice& OutputDevice::operator<< | ( | const std::string & | STR_Out | ) | const |
Output operator.
STR_Out | Output string object. |
const OutputDevice& OutputDevice::operator<< | ( | const tk::String & | STR_Out | ) | const |
Output operator.
STR_Out | Output string object. |
const OutputDevice& OutputDevice::operator<< | ( | const char *const | STR_Out | ) | const |
Output operator.
STR_Out | Output null terminated string. |
const OutputDevice& OutputDevice::operator<< | ( | const char | C_Out | ) | const |
Output operator.
C_Out | Single character. |
const OutputDevice& OutputDevice::operator<< | ( | const KEY | E_Key | ) | const |
Output operator.
E_Key | Single character as a KEY. |
const OutputDevice& OutputDevice::operator<< | ( | const uint8_t | UI8_Out | ) | const |
Output operator.
UI8_Out | 8 bits unsigned integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const int16_t | I16_Out | ) | const |
Output operator.
I16_Out | 16 bits integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const uint16_t | UI16_Out | ) | const |
Output operator.
UI16_Out | 16 bits unsigned integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const int32_t | I32_Out | ) | const |
Output operator.
I32_Out | 32 bits integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const uint32_t | UI32_Out | ) | const |
Output operator.
UI32_Out | 32 bits unsigned integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const int64_t | I64_Out | ) | const |
Output operator.
I64_Out | 64 bits integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const uint64_t | UI64_Out | ) | const |
Output operator.
UI64_Out | 64 bits unsigned integer number. |
const OutputDevice& OutputDevice::operator<< | ( | const float | F_Out | ) | const |
const OutputDevice& OutputDevice::operator<< | ( | const double | D_Out | ) | const |
Output operator.
D_Out | Double number. |
const OutputDevice& OutputDevice::operator<< | ( | const void *const | PV_Out | ) | const |
Output operator.
PV_Out | Void address. |
const OutputDevice& OutputDevice::operator<< | ( | const IOEndl & | CLI_IOEndl | ) | const |
Output operator.
CLI_IOEndl | Carriage return. |
|
pure virtual |
Output handler.
STR_Out | Output string. |
Implemented in TelnetConnection, OutputFileDevice, InputFileDevice, IOMux, SingleCommand, Console, Text, and StringDevice.
const int OutputDevice::UseInstance | ( | const CallInfo & | CLI_CallInfo | ) |
Ensures instance validity.
CLI_CallInfo | Call information. |
|
virtual |
Stack overflow protection.
CLI_Device | Other device that the callee device should check it would output characters to. |
Determines whether the current device would output the given device in any way. Default implementation checks whether CLI_Device is the self device.
Reimplemented in InputFileDevice, IOMux, SingleCommand, and Text.
Referenced by Text::WouldOutput().
|
mutableprotected |