PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
#include <CTerminal.h>
Public Member Functions | |
CommandHolder (unsigned int max_size_=1000) | |
~CommandHolder () | |
unsigned int | GetSize () |
Get the maximum size of the command array. More... | |
unsigned int | GetTotal () |
Get the total number of commands. More... | |
unsigned int | GetIndex () |
Get the current command index (relative to the most recent command) More... | |
void | Push (std::string &input_) |
Push a new command into the storage array. More... | |
void | Capture (const std::string &input_) |
Capture the current command line text and store it for later use. More... | |
void | Clear () |
Clear the command array. More... | |
std::string | GetPrev () |
Get the previous command entry. More... | |
std::string | PeekPrev () |
Get the next command entry but do not change the internal array index. More... | |
std::string | GetNext () |
Get the next command entry. More... | |
std::string | PeekNext () |
Get the next command entry but do not change the internal array index. More... | |
void | Dump () |
Dump all stored commands to the screen. More... | |
void | Reset () |
Reset history to last item. More... | |
Private Member Functions | |
unsigned int | wrap_ () |
Private Attributes | |
unsigned int | max_size |
unsigned int | index |
unsigned int | total |
unsigned int | external_index |
std::string * | commands |
std::string | fragment |
Definition at line 42 of file CTerminal.h.
|
inline |
Definition at line 55 of file CTerminal.h.
|
inline |
Definition at line 63 of file CTerminal.h.
|
inline |
Capture the current command line text and store it for later use.
Definition at line 78 of file CTerminal.h.
void CommandHolder::Clear | ( | void | ) |
Clear the command array.
Definition at line 88 of file CTerminal.cpp.
void CommandHolder::Dump | ( | void | ) |
Dump all stored commands to the screen.
Definition at line 152 of file CTerminal.cpp.
|
inline |
Get the current command index (relative to the most recent command)
Definition at line 72 of file CTerminal.h.
std::string CommandHolder::GetNext | ( | ) |
Get the next command entry.
Definition at line 132 of file CTerminal.cpp.
std::string CommandHolder::GetPrev | ( | ) |
Get the previous command entry.
Definition at line 109 of file CTerminal.cpp.
|
inline |
Get the maximum size of the command array.
Definition at line 66 of file CTerminal.h.
|
inline |
Get the total number of commands.
Definition at line 69 of file CTerminal.h.
std::string CommandHolder::PeekNext | ( | ) |
Get the next command entry but do not change the internal array index.
Definition at line 144 of file CTerminal.cpp.
std::string CommandHolder::PeekPrev | ( | ) |
Get the next command entry but do not change the internal array index.
Get the previous command entry but do not change the internal array index.
Definition at line 124 of file CTerminal.cpp.
void CommandHolder::Push | ( | std::string & | input_ | ) |
Push a new command into the storage array.
Definition at line 77 of file CTerminal.cpp.
void CommandHolder::Reset | ( | void | ) |
Reset history to last item.
Definition at line 158 of file CTerminal.cpp.
|
private |
Convert the external index (relative to the most recent command) to the internal index which is used to actually access the stored commands in the command array.
Definition at line 96 of file CTerminal.cpp.
|
private |
Definition at line 47 of file CTerminal.h.
|
private |
Definition at line 46 of file CTerminal.h.
|
private |
Definition at line 48 of file CTerminal.h.
|
private |
Definition at line 45 of file CTerminal.h.
|
private |
Definition at line 44 of file CTerminal.h.
|
private |
Definition at line 45 of file CTerminal.h.