#include <TryCommand.hpp>
Public Member Functions | |
TryCommand * | clone () const |
TryCommand * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const |
bool | execute () |
void | readArguments () |
void | reset () |
internal::AssignableDataSource< bool >::shared_ptr | result () |
base::ActionInterface * | theCommand () const |
TryCommand (base::ActionInterface *command, internal::AssignableDataSource< bool >::shared_ptr storage=0) | |
bool | valid () const |
~TryCommand () | |
Public Member Functions inherited from RTT::base::ActionInterface | |
virtual ActionInterface * | copy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const |
virtual | ~ActionInterface () |
Private Attributes | |
internal::AssignableDataSource< bool >::shared_ptr | _result |
base::ActionInterface * | c |
Additional Inherited Members | |
Public Types inherited from RTT::base::ActionInterface | |
typedef boost::shared_ptr< ActionInterface > | shared_ptr |
A command which tries another command and stores the result in a internal::DataSource<bool>.
Definition at line 59 of file TryCommand.hpp.
RTT::TryCommand::TryCommand | ( | base::ActionInterface * | command, |
internal::AssignableDataSource< bool >::shared_ptr | storage = 0 |
||
) |
Try a command.
Definition at line 48 of file TryCommand.cpp.
RTT::TryCommand::~TryCommand | ( | ) |
Definition at line 53 of file TryCommand.cpp.
|
virtual |
The Clone Software Pattern.
Implements RTT::base::ActionInterface.
Definition at line 100 of file TryCommand.cpp.
TryCommand * RTT::TryCommand::copy | ( | std::map< const base::DataSourceBase *, base::DataSourceBase * > & | alreadyCloned | ) | const |
Definition at line 105 of file TryCommand.cpp.
|
virtual |
Execute the functionality of this action.
Implements RTT::base::ActionInterface.
Definition at line 56 of file TryCommand.cpp.
|
virtual |
This is invoked some time before execute() at a time when the action may read its function arguments.
Implements RTT::base::ActionInterface.
Definition at line 82 of file TryCommand.cpp.
|
virtual |
Reset this action. Must be used after execute() failed.
Reimplemented from RTT::base::ActionInterface.
Definition at line 70 of file TryCommand.cpp.
AssignableDataSource< bool >::shared_ptr RTT::TryCommand::result | ( | ) |
Definition at line 96 of file TryCommand.cpp.
ActionInterface * RTT::TryCommand::theCommand | ( | ) | const |
Definition at line 92 of file TryCommand.cpp.
|
virtual |
Inspect if this action was executed and valid. This method may not be called before execute(). The default implementation returns always true, i.e. after execute(), it was executed. Override this method if it has more complex state semantics.
Reimplemented from RTT::base::ActionInterface.
Definition at line 75 of file TryCommand.cpp.
|
private |
Definition at line 64 of file TryCommand.hpp.
|
private |
Definition at line 65 of file TryCommand.hpp.