Orocos Real-Time Toolkit  2.8.3
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  public:
69  typedef std::vector<base::DataSourceBase::shared_ptr> CArguments;
70  typedef std::vector<std::string> Members;
71  typedef std::vector< ArgumentDescription > CDescriptions;
72 
73  CorbaOperationCallerFactory( const std::string& method_name, corba::CService_ptr fact, PortableServer::POA_ptr the_poa );
74 
75  virtual ~CorbaOperationCallerFactory();
76 
82  corba::CService_ptr getService() { return mfact.in(); }
83 
84  virtual unsigned int arity() const;
85 
86  virtual const types::TypeInfo* getArgumentType(unsigned int i) const;
87 
88  virtual const types::TypeInfo* getCollectType(unsigned int i) const;
89 
90  virtual unsigned int collectArity() const;
91 
92  virtual std::string resultType() const;
93 
94  virtual std::string getName() const;
95 
96  virtual std::string description() const;
97 
98  virtual std::vector< ArgumentDescription > getArgumentList() const;
99 
100  virtual base::DataSourceBase::shared_ptr produce(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const ;
101  virtual base::DataSourceBase::shared_ptr produceSend(const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* caller) const;
102 
103  virtual base::DataSourceBase::shared_ptr produceHandle() const;
104 
105  virtual base::DataSourceBase::shared_ptr produceCollect(const std::vector<base::DataSourceBase::shared_ptr>& args, internal::DataSource<bool>::shared_ptr blocking) const;
106 
107 #ifdef ORO_SIGNALLING_OPERATIONS
108  Handle produceSignal(base::ActionInterface* func, const std::vector<base::DataSourceBase::shared_ptr>& args, ExecutionEngine* subscriber) const;
109 #endif
110  };
111 
112 }}
113 
114 #endif
corba::CService_ptr getService()
Returns the remote service that hosts this part.
std::vector< ArgumentDescription > CDescriptions
A local factory for creating remote Corba methods.
An execution engine serialises (executes one after the other) the execution of all commands...
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:66
This class defines the interface for creating operation objects without using C++ templates...
boost::intrusive_ptr< DataSource< T > > shared_ptr
Definition: DataSource.hpp:115
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:51
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