38 #ifndef ORO_PROGRAMINTERFACE_HPP 39 #define ORO_PROGRAMINTERFACE_HPP 43 #include <boost/shared_ptr.hpp> 44 #include "../base/DataSourceBase.hpp" 45 #include "../base/AttributeBase.hpp" 46 #include "../base/ExecutableInterface.hpp" 48 #include "../rtt-fwd.hpp" 52 {
namespace scripting {
89 virtual bool start() = 0;
94 virtual bool pause() = 0;
99 virtual bool step() = 0;
104 virtual bool stop() = 0;
112 virtual bool execute()= 0;
117 virtual void reset() = 0;
122 inline bool isRunning()
const {
return pStatus == Status::running; }
127 inline bool isPaused()
const {
return pStatus == Status::paused; }
132 inline bool isStopped()
const {
return pStatus == Status::stopped; }
137 inline bool inError()
const {
return pStatus == Status::error; }
139 virtual bool stepDone()
const = 0;
144 virtual int getLineNumber()
const = 0;
155 virtual std::string getText()
const = 0;
160 virtual const std::string& getName()
const = 0;
165 virtual std::vector<base::AttributeBase*> getArguments()
const = 0;
189 virtual ProgramInterface* copy( std::map<const base::DataSourceBase*, base::DataSourceBase*>& replacementdss )
const = 0;
197 virtual bool needsStart()
const = 0;
ProgramStatus
Enumerates the statuses of a ProgramInterface.
bool isStopped() const
Returns true if the program is not executing (stopped) or not loaded.
boost::weak_ptr< ProgramInterface > ProgramInterfaceWPtr
#define RTT_SCRIPTING_API
boost::shared_ptr< ProgramInterface > ProgramInterfacePtr
Placeholder of the ProgramStatus.
An attribute is a minimalistic, named placeholder for data.
The program was running but is now paused.
Status::ProgramStatus pStatus
Status::ProgramStatus getStatus() const
Return the current status of the program.
bool isRunning() const
Returns true if the program is running.
This program is currently not loaded in an ExecutionEngine.
Objects that implement this interface are to be executed in the ExecutionEngine.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
A Program represents a collection of instructions that can be stepwise executed.
bool inError() const
Returns true if the program is in error.
bool isPaused() const
Returns true if the program is paused.
The program is not running.