38 #ifndef FUNCTION_GRAPH_HPP 39 #define FUNCTION_GRAPH_HPP 45 #include "../base/AttributeBase.hpp" 49 {
namespace scripting {
66 typedef boost::adjacency_list<boost::vecS,
71 typedef boost::graph_traits<Graph>::vertex_descriptor
Vertex;
72 typedef boost::graph_traits<Graph>::edge_descriptor
Edge;
107 std::vector<base::AttributeBase*>
args;
129 FunctionGraph(
const std::string& name,
bool unload_on_stop );
148 void setUnloadOnStop(
bool unload_on_stop);
163 virtual bool start();
165 virtual bool execute();
167 virtual void loading();
169 virtual void unloading();
173 virtual bool pause();
177 virtual bool stepDone()
const;
182 virtual void reset();
184 virtual int getLineNumber()
const;
186 virtual const std::string& getName()
const;
188 virtual FunctionGraph* copy( std::map<const base::DataSourceBase*, base::DataSourceBase*>& replacementdss )
const;
196 void setName(
const std::string& _name);
201 void setText(
const std::string& t);
203 std::string getText()
const;
205 void debugPrintout()
const;
260 void clearArguments();
const Graph & getGraph() const
boost::shared_ptr< FunctionGraph > FunctionGraphPtr
Graph program
The graph containing this function.
std::vector< base::AttributeBase * > args
Ordered arguments (are also in the repository).
boost::adjacency_list< boost::vecS, boost::listS, boost::directedS, VertProperty, EdgeProperty > Graph
void setResult(base::AttributeBase *r)
Will store the result in this attribute.
base::AttributeBase * retn
#define RTT_SCRIPTING_API
VertexNode::VertProperty VertProperty
std::string _text
Program text.
Vertex currentNode() const
std::string myName
The (unique) name of this program.
An attribute is a minimalistic, named placeholder for data.
boost::shared_ptr< Service > ServicePtr
std::vector< base::AttributeBase * > getArguments() const
Return an ordered list of this funcion's arguments.
boost::graph_traits< Graph >::edge_descriptor Edge
void addArgument(base::AttributeBase *a)
virtual bool needsStart() const
Returns true if a start() is necessary when this function is loaded with ExecutionEngine::runFunction...
boost::graph_traits< Graph >::vertex_descriptor Vertex
base::AttributeBase * getResult() const
Get the return value of this program.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Vertex previousNode() const
boost::weak_ptr< FunctionGraph > FunctionGraphWPtr
This class represents a function.
A Program represents a collection of instructions that can be stepwise executed.
EdgeCondition::EdgeProperty EdgeProperty
boost::property< vertex_command_t, VertexNode, boost::property< vertex_exec_t, int, boost::property< boost::vertex_index_t, int > > > VertProperty
property< edge_condition_t, EdgeCondition, property< boost::edge_index_t, int > > EdgeProperty