mt4cpp
Public Member Functions | Protected Attributes | List of all members
mt4cpp::TickCommand Class Reference

Testing concrete command class. This commands waits for some time checking halt flag. More...

#include <TickCommand.hpp>

Inheritance diagram for mt4cpp::TickCommand:
Inheritance graph
Collaboration diagram for mt4cpp::TickCommand:
Collaboration graph

Public Member Functions

 TickCommand (int steps=10)
 
virtual void operator() (Progress &progress)
 
void execute ()
 
CommandDesc getDescriptor () const
 
void setProgress (double new_progress)
 
void setState (CommandDesc::State new_state)
 
void setId (long new_id)
 
void halt ()
 
void checkHaltFlag () const
 
int getCounter () const
 
void attach (PCommandObserver observer)
 

Protected Attributes

boost::mutex m_
 

Detailed Description

Testing concrete command class. This commands waits for some time checking halt flag.

Member Function Documentation

virtual void mt4cpp::TickCommand::operator() ( Progress p)
inlinevirtual

the method which implements the specific task of command. The private members can be overlapped

Implements mt4cpp::Command.

void mt4cpp::Command::execute ( )
inlineinherited

the method called by scheduler. It calls the operator() of command.

References mt4cpp::Command::setState().

CommandDesc mt4cpp::Command::getDescriptor ( ) const
inlineinherited

returns the command actual state and progress

void mt4cpp::Command::setProgress ( double  new_progress)
inlineinherited

mutator - change the command progress (called by Progress::setProgress() )

References mt4cpp::CommandDesc::progress_.

void mt4cpp::Command::setState ( CommandDesc::State  new_state)
inlineinherited

mutator - change the command state (called by Scheduler )

References mt4cpp::CommandDesc::state_.

Referenced by mt4cpp::Command::execute().

void mt4cpp::Command::setId ( long  new_id)
inlineinherited

mutator - change the commmand id (called by Scheduler )

References mt4cpp::CommandDesc::id_.

void mt4cpp::Command::halt ( )
inlineinherited

Suggest the command to break execution (ie sets the flags)

void mt4cpp::Command::checkHaltFlag ( ) const
inlineinherited

Check the halt flag and throws the exception if set

Referenced by mt4cpp::Progress::step().

int mt4cpp::Command::getCounter ( ) const
inlineinherited

the accessor to the counter

void mt4cpp::Command::attach ( PCommandObserver  observer)
inlineinherited

add observer (add observer to command)

References mt4cpp::Progress::attach().


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