mt4cpp
Public Member Functions | Protected Attributes | Friends | List of all members
mt4cpp::Command Class Referenceabstract

#include <Command.hpp>

Inheritance diagram for mt4cpp::Command:
Inheritance graph
Collaboration diagram for mt4cpp::Command:
Collaboration graph

Public Member Functions

virtual ~Command ()
 
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_
 

Friends

void intrusive_ptr_add_ref (Command *ptr)
 
void intrusive_ptr_release (Command *ptr)
 

Detailed Description

The basic class of command, which is executed by scheduler.

Constructor & Destructor Documentation

virtual mt4cpp::Command::~Command ( )
inlinevirtual

destructor

Member Function Documentation

void mt4cpp::Command::execute ( )
inline

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

References setState().

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

returns the command actual state and progress

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

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

References mt4cpp::CommandDesc::progress_.

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

mutator - change the command state (called by Scheduler )

References mt4cpp::CommandDesc::state_.

Referenced by execute().

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

mutator - change the commmand id (called by Scheduler )

References mt4cpp::CommandDesc::id_.

void mt4cpp::Command::halt ( )
inline

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

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

Check the halt flag and throws the exception if set

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

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

the accessor to the counter

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

add observer (add observer to command)

References mt4cpp::Progress::attach().

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( Command ptr)
friend

for intrusive_ptr


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