My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Command Class Reference

Public Member Functions

 Command ()
 
virtual ~Command ()
 
void installDoneHandler (COMMAND_DONE_HANDLER(*handler), void *args=0)
 
void installFailedHandler (COMMAND_FAILED_HANDLER(*handler), void *args=0)
 
Instructioninsert (Instruction instruction)
 
void insert (Command &command)
 
void run ()
 
TimeValtimeOut ()
 
bool active ()
 
void restart (struct timeval *timeOut)
 
void executeNextInstruction (TimeVal &timeOut, bool setToValue)
 

Protected Member Functions

void initialize ()
 
void reset ()
 
bool isComplete ()
 
void registerCompletion ()
 
void registerFailure ()
 

Protected Attributes

bool active_
 
COMMAND_DONE_HANDLER * doneHandler_
 
void * doneArgs_
 
COMMAND_FAILED_HANDLER * failedHandler_
 
void * failedArgs_
 
std::string name_
 
std::vector< Instructioninstructions_
 
std::vector< Instruction >
::iterator 
nextInstruction_
 
TimeVal lastTime_
 
TimeVal currTime_
 
TimeVal diff_
 
TimeVal timeOut_
 

Constructor & Destructor Documentation

Command::Command ( )

Constructor.

....................................................................... Constructor.

Command::~Command ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

void Command::executeNextInstruction ( TimeVal timeOut,
bool  setToValue 
)

....................................................................... Execute the next instruction

void Command::initialize ( void  )
protected

....................................................................... (Re)Initialize this command

Instruction * Command::insert ( Instruction  instruction)

....................................................................... Insert another instruction into our list

void Command::insert ( Command command)

....................................................................... Insert another command

void Command::installDoneHandler ( COMMAND_DONE_HANDLER *  handler,
void *  args = 0 
)

Install a handler to be called when this command is complete

....................................................................... Install a handler to be called when this command is complete

void Command::installFailedHandler ( COMMAND_FAILED_HANDLER *  handler,
void *  args = 0 
)

Install a handler to be called if this command fails

....................................................................... Install a handler to be called if this command fails

bool Command::isComplete ( )
protected

....................................................................... Return true if this command is complete

void Command::registerCompletion ( )
protected

....................................................................... Register that this command has completed

void Command::registerFailure ( )
protected

....................................................................... Register that this command has failed

void Command::reset ( )
protected

....................................................................... (Re)Initialize this command

void Command::restart ( struct timeval *  timeOut)

....................................................................... (Re)Initialize this command

void Command::run ( void  )

....................................................................... Run this command


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