Classes | Public Member Functions | Protected Attributes | List of all members
RTT::scripting::ProgramInterface Class Referenceabstract

A Program represents a collection of instructions that can be stepwise executed. More...

#include <ProgramInterface.hpp>

Inheritance diagram for RTT::scripting::ProgramInterface:
Inheritance graph
[legend]

Classes

struct  Status
 

Public Member Functions

virtual ProgramInterfaceclone () const =0
 
virtual ProgramInterfacecopy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &replacementdss) const =0
 
virtual bool execute ()=0
 
virtual std::vector< base::AttributeBase * > getArguments () const =0
 
virtual int getLineNumber () const =0
 
virtual const std::string & getName () const =0
 
virtual base::AttributeBasegetResult () const =0
 
Status::ProgramStatus getStatus () const
 
virtual std::string getText () const =0
 
bool inError () const
 
bool isPaused () const
 
bool isRunning () const
 
bool isStopped () const
 
virtual bool needsStart () const =0
 
virtual bool pause ()=0
 
 ProgramInterface ()
 
virtual void reset ()=0
 
virtual bool start ()=0
 
virtual bool step ()=0
 
virtual bool stepDone () const =0
 
virtual bool stop ()=0
 
virtual ~ProgramInterface ()
 
- Public Member Functions inherited from RTT::base::ExecutableInterface
 ExecutableInterface ()
 
ExecutionEnginegetEngine ()
 
bool isLoaded ()
 
void loaded (ExecutionEngine *ee)
 
virtual void loading ()
 
void unloaded ()
 
virtual void unloading ()
 
virtual ~ExecutableInterface ()
 

Protected Attributes

Status::ProgramStatus pStatus
 
- Protected Attributes inherited from RTT::base::ExecutableInterface
ExecutionEngineengine
 

Detailed Description

A Program represents a collection of instructions that can be stepwise executed.

Definition at line 60 of file ProgramInterface.hpp.

Constructor & Destructor Documentation

RTT::ProgramInterface::ProgramInterface ( )

Definition at line 46 of file ProgramInterface.cpp.

RTT::ProgramInterface::~ProgramInterface ( )
virtual

Definition at line 48 of file ProgramInterface.cpp.

Member Function Documentation

virtual ProgramInterface* RTT::scripting::ProgramInterface::clone ( ) const
pure virtual
virtual ProgramInterface* RTT::scripting::ProgramInterface::copy ( std::map< const base::DataSourceBase *, base::DataSourceBase * > &  replacementdss) const
pure virtual

Clone this Program. This will produce a completely new instance, that has nothing in common with this one. It takes care to properly map identical DataSources to identical DataSources.

Parameters
alreadyMappedDataA map of some DataSources used in this program to new DataSources that should replace them in the new Program. This is provided, because in some cases the outside world also keeps references to datasources used somewhere in this programgraph. It is then important that when this Program is copied, the outside world has a way to get a reference to the corresponding datasources in the new program. We do this by allowing it to map some datasources itself, and simply provide us a list of its mappings.

Implemented in RTT::scripting::FunctionGraph.

virtual bool RTT::scripting::ProgramInterface::execute ( )
pure virtual

Execute as much actions until the program needs to wait on a condition to become true. When paused, only execute one action.

Returns
false if a program error occured.

Implements RTT::base::ExecutableInterface.

Implemented in RTT::scripting::FunctionGraph.

virtual std::vector<base::AttributeBase*> RTT::scripting::ProgramInterface::getArguments ( ) const
pure virtual

Get the argument list of this program.

Implemented in RTT::scripting::FunctionGraph.

virtual int RTT::scripting::ProgramInterface::getLineNumber ( ) const
pure virtual

Return the current 'line number' of the program.

Implemented in RTT::scripting::FunctionGraph.

virtual const std::string& RTT::scripting::ProgramInterface::getName ( ) const
pure virtual

Programs can be refered to by name.

Implemented in RTT::scripting::FunctionGraph.

virtual base::AttributeBase* RTT::scripting::ProgramInterface::getResult ( ) const
pure virtual

Get the return value of this program.

Implemented in RTT::scripting::FunctionGraph.

Status::ProgramStatus RTT::scripting::ProgramInterface::getStatus ( ) const
inline

Return the current status of the program.

Definition at line 149 of file ProgramInterface.hpp.

virtual std::string RTT::scripting::ProgramInterface::getText ( ) const
pure virtual

Return the program text to which getLineNumber() refers.

Implemented in RTT::scripting::FunctionGraph.

bool RTT::scripting::ProgramInterface::inError ( ) const
inline

Returns true if the program is in error.

Definition at line 137 of file ProgramInterface.hpp.

bool RTT::scripting::ProgramInterface::isPaused ( ) const
inline

Returns true if the program is paused.

Definition at line 127 of file ProgramInterface.hpp.

bool RTT::scripting::ProgramInterface::isRunning ( ) const
inline

Returns true if the program is running.

Definition at line 122 of file ProgramInterface.hpp.

bool RTT::scripting::ProgramInterface::isStopped ( ) const
inline

Returns true if the program is not executing (stopped) or not loaded.

Definition at line 132 of file ProgramInterface.hpp.

virtual bool RTT::scripting::ProgramInterface::needsStart ( ) const
pure virtual

Returns true if a start() is necessary after this function is loaded with ExecutionEngine::runFunction().

Implemented in RTT::scripting::FunctionGraph.

virtual bool RTT::scripting::ProgramInterface::pause ( )
pure virtual

Pause or start-and-pause the execution of this program.

Implemented in RTT::scripting::FunctionGraph.

virtual void RTT::scripting::ProgramInterface::reset ( )
pure virtual

Reset the execution point to the beginning of this program interface.

Implemented in RTT::scripting::FunctionGraph.

virtual bool RTT::scripting::ProgramInterface::start ( )
pure virtual

Start the execution of this program.

Implemented in RTT::scripting::FunctionGraph.

virtual bool RTT::scripting::ProgramInterface::step ( )
pure virtual

Execute a single action when paused.

Implemented in RTT::scripting::FunctionGraph.

virtual bool RTT::scripting::ProgramInterface::stepDone ( ) const
pure virtual
virtual bool RTT::scripting::ProgramInterface::stop ( )
pure virtual

Stop the execution of this program.

Implemented in RTT::scripting::FunctionGraph.

Member Data Documentation

Status::ProgramStatus RTT::scripting::ProgramInterface::pStatus
protected

Definition at line 80 of file ProgramInterface.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:47