Orocos Real-Time Toolkit  2.9.0
OperationInterfacePart.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: The SourceWorks Tue Sep 7 00:55:18 CEST 2010 OperationInterfacePart.hpp
3 
4  OperationInterfacePart.hpp - description
5  -------------------
6  begin : Tue September 07 2010
7  copyright : (C) 2010 The SourceWorks
8  email : peter@thesourceworks.com
9 
10  ***************************************************************************
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU General Public *
13  * License as published by the Free Software Foundation; *
14  * version 2 of the License. *
15  * *
16  * As a special exception, you may use this file as part of a free *
17  * software library without restriction. Specifically, if other files *
18  * instantiate templates or use macros or inline functions from this *
19  * file, or you compile this file and link it with other files to *
20  * produce an executable, this file does not by itself cause the *
21  * resulting executable to be covered by the GNU General Public *
22  * License. This exception does not however invalidate any other *
23  * reasons why the executable file might be covered by the GNU General *
24  * Public License. *
25  * *
26  * This library is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
29  * Lesser General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public *
32  * License along with this library; if not, write to the Free Software *
33  * Foundation, Inc., 59 Temple Place, *
34  * Suite 330, Boston, MA 02111-1307 USA *
35  * *
36  ***************************************************************************/
37 
38 
39 #ifndef ORO_OPERATIONREPOSITORYPART_HPP_
40 #define ORO_OPERATIONREPOSITORYPART_HPP_
41 
42 #include <string>
43 #include <vector>
44 
45 #include "base/DataSourceBase.hpp"
46 #include "internal/DataSource.hpp"
47 #include "ArgumentDescription.hpp"
48 
49 
50 namespace RTT
51 {
70  {
71  public:
73 
78  virtual std::string getName() const = 0;
79 
84  virtual std::string description() const = 0;
85 
90  virtual std::vector<ArgumentDescription> getArgumentList() const = 0;
91 
95  virtual std::string resultType() const = 0;
96 
101  virtual unsigned int arity() const = 0;
102 
109  virtual const types::TypeInfo* getArgumentType(unsigned int arg) const = 0;
110 
116  virtual unsigned int collectArity() const = 0;
117 
124  virtual const types::TypeInfo* getCollectType(unsigned int arg) const = 0;
125 
138  virtual base::DataSourceBase::shared_ptr produce(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const = 0;
139 
154  virtual base::DataSourceBase::shared_ptr produceSend(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const = 0;
155 
165 
180  virtual base::DataSourceBase::shared_ptr produceCollect(const std::vector<base::DataSourceBase::shared_ptr>& args, internal::DataSource<bool>::shared_ptr blocking) const = 0;
181 
182 #ifdef ORO_SIGNALLING_OPERATIONS
183 
195  virtual Handle produceSignal( base::ActionInterface* func, const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* subscriber) const = 0;
196 #endif
197 
202  RTT_API virtual boost::shared_ptr<base::DisposableInterface> getLocalOperation() const;
203  };
204 }
205 #endif /* ORO_OPERATIONREPOSITORYPART_HPP_ */
virtual base::DataSourceBase::shared_ptr produceSend(const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0
Create a DataSource for a given send operation.
virtual const types::TypeInfo * getArgumentType(unsigned int arg) const =0
Returns the type information of the n&#39;th argument, with argument zero being the return value...
virtual const types::TypeInfo * getCollectType(unsigned int arg) const =0
Returns the type information of the n&#39;th collectable argument.
#define RTT_API
Definition: rtt-config.h:97
virtual std::string getName() const =0
Returns the name of this operation.
virtual std::string description() const =0
Returns the description of this operation.
An execution engine serialises (executes one after the other) the execution of all commands...
virtual unsigned int arity() const =0
Returns the arity (number of arguments) of this operation.
virtual base::DataSourceBase::shared_ptr produceHandle() const =0
Create an empty SendHandle object for this operation.
Based on the software pattern &#39;command&#39;, this interface allows execution of action objects...
A class for representing a user type, and which can build instances of that type. ...
Definition: TypeInfo.hpp:67
virtual base::DataSourceBase::shared_ptr produce(const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const =0
Create a DataSource for a given callable operation.
This class defines the interface for creating operation objects without using C++ templates...
virtual std::string resultType() const =0
Return the result (return) type of this operation.
boost::intrusive_ptr< DataSource< T > > shared_ptr
Definition: DataSource.hpp:115
virtual base::DataSourceBase::shared_ptr produceCollect(const std::vector< base::DataSourceBase::shared_ptr > &args, internal::DataSource< bool >::shared_ptr blocking) const =0
Create a DataSource for collecting the results of a Send.
virtual RTT_API boost::shared_ptr< base::DisposableInterface > getLocalOperation() const
Returns any local operation associated with this operation.
virtual std::vector< ArgumentDescription > getArgumentList() const =0
Get a description of the desired arguments in the ArgumentDescription format.
virtual RTT_API ~OperationInterfacePart()
virtual unsigned int collectArity() const =0
Returns the number of collectable arguments of this operation&#39;s function.
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:52
The Handle holds the information, and allows manipulation, of a connection between a internal::Signal...
Definition: Handle.hpp:66