]> SALOME platform Git repositories - modules/yacs.git/blob - src/runtime/CORBAPorts.hxx
Salome HOME
c1c0d057d60ca61800b34c13b69036b1b02f082a
[modules/yacs.git] / src / runtime / CORBAPorts.hxx
1 #ifndef _CORBAPORTS_HXX_
2 #define _CORBAPORTS_HXX_
3
4 #include <omniORB4/CORBA.h>
5
6 #include "InputPort.hxx"
7 #include "OutputPort.hxx"
8
9 namespace YACS
10 {
11   namespace ENGINE
12   {
13
14     class InputCorbaPort : public InputPort
15     {
16     public:
17       InputCorbaPort(const std::string& name, Node *node, TypeCode * type);
18       virtual void put(const void *data) throw(ConversionException);
19       void put(CORBA::Any *data) throw (ConversionException);
20       virtual CORBA::Any * getAny();
21     protected:
22       CORBA::Any  _data;
23       CORBA::ORB_ptr _orb;
24     };
25
26     class OutputCorbaPort : public OutputPort
27     {
28     public:
29       OutputCorbaPort(const std::string& name, Node *node, TypeCode * type);
30       virtual void put(const void *data) throw(ConversionException);
31       void put(CORBA::Any *data) throw (ConversionException);
32       virtual CORBA::Any * getAny();
33       virtual CORBA::Any * getAnyOut();
34       friend std::ostream & operator<< ( std::ostream &os,
35                                          const OutputCorbaPort& p);
36     protected:
37       CORBA::Any  _data;
38       CORBA::ORB_ptr _orb;
39     };
40
41
42   }
43 }
44
45 #endif