Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef ORO_OPERATION_REPOSITORY_HPP
00040 #define ORO_OPERATION_REPOSITORY_HPP
00041
00042 #include <string>
00043 #include <vector>
00044 #include <map>
00045
00046 #include "rtt-config.h"
00047 #include "base/DataSourceBase.hpp"
00048 #include "internal/DataSource.hpp"
00049 #include "ArgumentDescription.hpp"
00050 #include "FactoryExceptions.hpp"
00051 #include "OperationInterfacePart.hpp"
00052
00053
00054 namespace RTT
00055 {
00062 class RTT_API OperationInterface
00063 {
00064 protected:
00065 typedef std::map<std::string, OperationInterfacePart*> map_t;
00066 map_t data;
00067 public:
00071 typedef std::vector<base::DataSourceBase::shared_ptr> Arguments;
00072
00076 void clear();
00077
00081 std::vector<std::string> getNames() const;
00082
00086 bool hasMember(const std::string& name) const;
00087
00096 int getArity(const std::string& name) const;
00097
00107 int getCollectArity(const std::string& name) const;
00108
00114 bool isSynchronous(const std::string& name) const;
00115
00128 base::DataSourceBase::shared_ptr produce(const std::string& name, const Arguments& args, ExecutionEngine* caller) const;
00129
00144 base::DataSourceBase::shared_ptr produceSend(const std::string& name, const Arguments& args, ExecutionEngine* caller) const;
00145
00160 base::DataSourceBase::shared_ptr produceHandle(const std::string& name) const;
00161
00178 base::DataSourceBase::shared_ptr produceCollect(const std::string& name, const Arguments& args, internal::DataSource<bool>::shared_ptr blocking) const;
00179
00180 #ifdef ORO_SIGNALLING_OPERATIONS
00181
00196 Handle produceSignal(const std::string& name, base::ActionInterface* func, const std::vector<base::DataSourceBase::shared_ptr>& args) const;
00197 #endif
00198
00201 typedef std::vector<ArgumentDescription> Descriptions;
00202
00211 Descriptions getArgumentList(const std::string& name) const;
00212
00221 std::string getResultType(const std::string& name) const;
00222
00231 std::string getDescription(const std::string& name) const;
00232
00239 void add(const std::string& name, OperationInterfacePart* part);
00240
00246 void remove(const std::string& name);
00247
00253 OperationInterfacePart* getPart(const std::string& name);
00254 };
00255 }
00256
00257 #endif