CLI
2.9
|
Command line edition objet. More...
#include <command_line_edition.h>
Public Member Functions | |
CmdLineEdition (const CmdLineEdition &) | |
Copy constructor. More... | |
CmdLineEdition (void) | |
Default constructor. More... | |
virtual | ~CmdLineEdition (void) |
Destructor. More... | |
CmdLineEdition & | operator= (const CmdLineEdition &) |
Assignment operator. More... | |
void | Set (const tk::String &TK_Left, const tk::String &TK_Right) |
Set the object. More... | |
void | Reset (void) |
Reset the object. More... | |
void | SetInsertMode (const bool B_InsertMode) |
Insert mode setting. More... | |
const bool | GetInsertMode (void) const |
Insert mode retrieval. More... | |
void | Put (const OutputDevice &CLI_OutputDevice, const KEY E_Char) |
Character addition. More... | |
void | Put (const OutputDevice &CLI_OutputDevice, const tk::String &TK_String) |
String addition. More... | |
void | CleanAll (const OutputDevice &CLI_OutputDevice) |
Line deletion. More... | |
void | Delete (const OutputDevice &CLI_OutputDevice, const int I_Count) |
Character deletion. More... | |
void | PrintCmdLine (const OutputDevice &CLI_OutputDevice) const |
Command line display. More... | |
void | MoveCursor (const OutputDevice &CLI_OutputDevice, const int I_Count) |
Moves the cursor. More... | |
void | NextLine (const OutputDevice &CLI_OutputDevice) |
Moves the cursor to the next line. More... | |
void | Home (const OutputDevice &CLI_OutputDevice) |
Moves the cursor at the beginning of the line. More... | |
void | End (const OutputDevice &CLI_OutputDevice) |
Moves the cursor at the end of the line. More... | |
const tk::String | GetLine (void) const |
Current command line. More... | |
const tk::String | GetRight (void) const |
Right part of the command line accessor. More... | |
const tk::String | GetLeft (void) const |
Left part of the command line accessor. More... | |
const tk::String | GetNextWord (void) const |
Next word retrieval. More... | |
const tk::String | GetPrevWord (void) const |
Previous word retrieval. More... | |
![]() | |
virtual | ~Object (void)=0 |
Pure virtual destructor. More... | |
Additional Inherited Members | |
![]() | |
Object (void) | |
Default constructor only available to sub-classes. More... | |
Command line edition objet.
Definition at line 48 of file command_line_edition.h.
CmdLineEdition::CmdLineEdition | ( | const CmdLineEdition & | ) |
Copy constructor.
Useful so that CmdLineEdition objects can stored in a tk::Queue<CmdLineEdition> member in CmdLineHistory.
|
explicit |
Default constructor.
|
virtual |
Destructor.
void CmdLineEdition::CleanAll | ( | const OutputDevice & | CLI_OutputDevice | ) |
Line deletion.
CLI_OutputDevice | Output device. |
Referenced by Password::OnKey(), Line::OnKey(), Password::ResetToDefault(), and Line::SetLine().
void CmdLineEdition::Delete | ( | const OutputDevice & | CLI_OutputDevice, |
const int | I_Count | ||
) |
Character deletion.
CLI_OutputDevice | Output device. |
I_Count | Number of characters to delete. A positive value means deleting characters forward (from the right of the cursor). A negative value means deleting characters backward (from the left of the cursor, ie backspace). |
Referenced by Password::OnKey(), and Line::OnKey().
void CmdLineEdition::End | ( | const OutputDevice & | CLI_OutputDevice | ) |
Moves the cursor at the end of the line.
CLI_OutputDevice | Output device. |
Referenced by Password::OnKey(), and Line::OnKey().
const bool CmdLineEdition::GetInsertMode | ( | void | ) | const |
Insert mode retrieval.
const tk::String CmdLineEdition::GetLeft | ( | void | ) | const |
Left part of the command line accessor.
Referenced by Password::OnKey(), and Line::OnKey().
const tk::String CmdLineEdition::GetLine | ( | void | ) | const |
Current command line.
Referenced by Line::GetLine(), Password::GetPassword(), Password::OnKey(), and Line::OnKey().
const tk::String CmdLineEdition::GetNextWord | ( | void | ) | const |
Next word retrieval.
const tk::String CmdLineEdition::GetPrevWord | ( | void | ) | const |
Previous word retrieval.
const tk::String CmdLineEdition::GetRight | ( | void | ) | const |
Right part of the command line accessor.
Referenced by Password::OnKey(), and Line::OnKey().
void CmdLineEdition::Home | ( | const OutputDevice & | CLI_OutputDevice | ) |
Moves the cursor at the beginning of the line.
CLI_OutputDevice | Output device. |
Referenced by Password::OnKey(), and Line::OnKey().
void CmdLineEdition::MoveCursor | ( | const OutputDevice & | CLI_OutputDevice, |
const int | I_Count | ||
) |
Moves the cursor.
CLI_OutputDevice | Output device. |
I_Count | Number of characters to switch. A positive value means moving forward (on the right). A negative value means moving backward (on the left). |
Referenced by Password::OnKey(), and Line::OnKey().
void CmdLineEdition::NextLine | ( | const OutputDevice & | CLI_OutputDevice | ) |
Moves the cursor to the next line.
CLI_OutputDevice | Output device. |
Referenced by Password::OnKey(), Line::OnKey(), and Line::SetLine().
CmdLineEdition& CmdLineEdition::operator= | ( | const CmdLineEdition & | ) |
Assignment operator.
void CmdLineEdition::PrintCmdLine | ( | const OutputDevice & | CLI_OutputDevice | ) | const |
Command line display.
CLI_OutputDevice | Output device. |
void CmdLineEdition::Put | ( | const OutputDevice & | CLI_OutputDevice, |
const KEY | E_Char | ||
) |
Character addition.
CLI_OutputDevice | Output device. |
E_Char | Character to add. |
Referenced by Line::SetLine().
void CmdLineEdition::Put | ( | const OutputDevice & | CLI_OutputDevice, |
const tk::String & | TK_String | ||
) |
void CmdLineEdition::Reset | ( | void | ) |
Reset the object.
Referenced by Password::OnKey(), Password::Reset(), Line::Reset(), and Password::ResetToDefault().
void CmdLineEdition::Set | ( | const tk::String & | TK_Left, |
const tk::String & | TK_Right | ||
) |
Set the object.
TK_Left | Left part of the command line. |
TK_Right | Right part of the command line. |
void CmdLineEdition::SetInsertMode | ( | const bool | B_InsertMode | ) |
Insert mode setting.
B_InsertMode | Insert Mode. |