CorbaOperationCallerFactory.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  tag: Peter Soetens Mon Jun 26 13:25:59 CEST 2006 CorbaOperationCallerFactory.hpp
3 
4  CorbaOperationCallerFactory.hpp - description
5  -------------------
6  begin : Mon June 26 2006
7  copyright : (C) 2006 Peter Soetens
8  email : peter.soetens@fmtc.be
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 
40 #ifndef ORO_CORBAMETHODFACTORY_HPP
41 #define ORO_CORBAMETHODFACTORY_HPP
42 
43 #include "corba.h"
44 #ifdef CORBA_IS_TAO
45 #include <tao/PortableServer/PortableServer.h>
46 #endif
47 #include "../../OperationInterface.hpp"
48 #include "../../FactoryExceptions.hpp"
49 #include "ServiceC.h"
50 #include "CorbaConversion.hpp"
51 #include "CorbaTypeTransporter.hpp"
52 
53 namespace RTT
54 {namespace corba
55 {
56 
62  class RTT_CORBA_API CorbaOperationCallerFactory
64  {
65  corba::CService_var mfact;
66  PortableServer::POA_var mpoa;
67  std::string method;
68  boost::shared_ptr<COperation const> mdescription;
69  public:
70  typedef std::vector<base::DataSourceBase::shared_ptr> CArguments;
71  typedef std::vector<std::string> Members;
72  typedef std::vector< ArgumentDescription > CArgumentDescriptions;
73 
74  CorbaOperationCallerFactory( const std::string& method_name, corba::CService_ptr fact, PortableServer::POA_ptr the_poa );
75 
76  CorbaOperationCallerFactory( const COperation& operation, corba::CService_ptr fact, PortableServer::POA_ptr the_poa );
77 
78  virtual ~CorbaOperationCallerFactory();
79 
85  corba::CService_ptr getService() { return mfact.in(); }
86 
87  virtual unsigned int arity() const;
88 
89  virtual const types::TypeInfo* getArgumentType(unsigned int i) const;
90 
91  virtual const types::TypeInfo* getCollectType(unsigned int i) const;
92 
93  virtual unsigned int collectArity() const;
94 
95  virtual std::string resultType() const;
96 
97  virtual std::string getName() const;
98 
99  virtual std::string description() const;
100 
101  virtual std::vector< ArgumentDescription > getArgumentList() const;
102 
103  virtual base::DataSourceBase::shared_ptr produce(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const ;
104  virtual base::DataSourceBase::shared_ptr produceSend(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const;
105 
106  virtual base::DataSourceBase::shared_ptr produceHandle() const;
107 
108  virtual base::DataSourceBase::shared_ptr produceCollect(const std::vector<base::DataSourceBase::shared_ptr>& args, internal::DataSource<bool>::shared_ptr blocking) const;
109 
110 #ifdef ORO_SIGNALLING_OPERATIONS
111  Handle produceSignal(base::ActionInterface* func, const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* subscriber) const;
112 #endif
113  };
114 
115 }}
116 
117 #endif
Based on the software pattern &#39;command&#39;, this interface allows execution of action objects...
boost::intrusive_ptr< DataSource< T > > shared_ptr
Definition: DataSource.hpp:115
std::vector< ArgumentDescription > CArgumentDescriptions
boost::shared_ptr< COperation const > mdescription
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:53
std::vector< base::DataSourceBase::shared_ptr > CArguments
The Handle holds the information, and allows manipulation, of a connection between a internal::Signal...
Definition: Handle.hpp:66


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