PAASS
Software suite to Acquire and Analyze Data from Pixie16
CommandHolder Class Reference

#include <CTerminal.h>

Collaboration diagram for CommandHolder:

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
 

Detailed Description

Definition at line 42 of file CTerminal.h.

Constructor & Destructor Documentation

§ CommandHolder()

CommandHolder::CommandHolder ( unsigned int  max_size_ = 1000)
inline

Definition at line 55 of file CTerminal.h.

§ ~CommandHolder()

CommandHolder::~CommandHolder ( )
inline

Definition at line 63 of file CTerminal.h.

Member Function Documentation

§ Capture()

void CommandHolder::Capture ( const std::string &  input_)
inline

Capture the current command line text and store it for later use.

Definition at line 78 of file CTerminal.h.

Here is the call graph for this function:
Here is the caller graph for this function:

§ Clear()

void CommandHolder::Clear ( void  )

Clear the command array.

Definition at line 88 of file CTerminal.cpp.

Here is the caller graph for this function:

§ Dump()

void CommandHolder::Dump ( void  )

Dump all stored commands to the screen.

Definition at line 152 of file CTerminal.cpp.

Here is the caller graph for this function:

§ GetIndex()

unsigned int CommandHolder::GetIndex ( )
inline

Get the current command index (relative to the most recent command)

Definition at line 72 of file CTerminal.h.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetNext()

std::string CommandHolder::GetNext ( )

Get the next command entry.

Definition at line 132 of file CTerminal.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetPrev()

std::string CommandHolder::GetPrev ( )

Get the previous command entry.

Definition at line 109 of file CTerminal.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetSize()

unsigned int CommandHolder::GetSize ( )
inline

Get the maximum size of the command array.

Definition at line 66 of file CTerminal.h.

§ GetTotal()

unsigned int CommandHolder::GetTotal ( )
inline

Get the total number of commands.

Definition at line 69 of file CTerminal.h.

§ PeekNext()

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.

Here is the caller graph for this function:

§ PeekPrev()

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.

Here is the caller graph for this function:

§ Push()

void CommandHolder::Push ( std::string &  input_)

Push a new command into the storage array.

Definition at line 77 of file CTerminal.cpp.

Here is the caller graph for this function:

§ Reset()

void CommandHolder::Reset ( void  )

Reset history to last item.

Definition at line 158 of file CTerminal.cpp.

Here is the caller graph for this function:

§ wrap_()

unsigned int CommandHolder::wrap_ ( )
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.

Here is the caller graph for this function:

Field Documentation

§ commands

std::string* CommandHolder::commands
private

Definition at line 47 of file CTerminal.h.

§ external_index

unsigned int CommandHolder::external_index
private

Definition at line 46 of file CTerminal.h.

§ fragment

std::string CommandHolder::fragment
private

Definition at line 48 of file CTerminal.h.

§ index

unsigned int CommandHolder::index
private

Definition at line 45 of file CTerminal.h.

§ max_size

unsigned int CommandHolder::max_size
private

Definition at line 44 of file CTerminal.h.

§ total

unsigned int CommandHolder::total
private

Definition at line 45 of file CTerminal.h.


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