1 // Copyright (C) 2006-2008 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef _CORBAPORTS_HXX_
20 #define _CORBAPORTS_HXX_
22 #include <omniORB4/CORBA.h>
24 #include "InputPort.hxx"
25 #include "OutputPort.hxx"
32 /*! \brief Class for CORBA Input Ports
38 class InputCorbaPort : public InputPort
41 InputCorbaPort(const std::string& name, Node *node, TypeCode * type);
42 InputCorbaPort(const InputCorbaPort& other, Node *newHelder);
43 virtual ~InputCorbaPort();
44 bool edIsManuallyInitialized() const;
45 void edRemoveManInit();
46 virtual void put(const void *data) throw(ConversionException);
47 void put(CORBA::Any *data) throw (ConversionException);
48 InputPort *clone(Node *newHelder) const;
49 void *get() const throw(Exception);
50 virtual bool isEmpty();
51 virtual CORBA::Any * getAny();
52 virtual std::string getAsString();
53 virtual PyObject* getPyObj();
54 virtual void exSaveInit();
55 virtual void exRestoreInit();
56 virtual std::string dump();
57 virtual std::string typeName() {return "YACS__ENGINE__InputCorbaPort";}
58 virtual std::string valToStr();
59 virtual void valFromStr(std::string valstr);
62 CORBA::Any * _initData;
66 class OutputCorbaPort;
68 std::ostream & operator<<( std::ostream &os,
69 const YACS::ENGINE::OutputCorbaPort& p);
71 class OutputCorbaPort : public OutputPort
73 friend std::ostream &operator<< ( std::ostream &os,
74 const OutputCorbaPort& p);
76 OutputCorbaPort(const std::string& name, Node *node, TypeCode * type);
77 OutputCorbaPort(const OutputCorbaPort& other, Node *newHelder);
78 virtual ~OutputCorbaPort();
79 virtual void put(const void *data) throw(ConversionException);
80 void put(CORBA::Any *data) throw (ConversionException);
81 OutputPort *clone(Node *newHelder) const;
82 virtual CORBA::Any * getAny();
83 virtual CORBA::Any * getAnyOut();
84 virtual std::string getAsString();
85 virtual PyObject* getPyObj();
86 virtual std::string dump();
87 virtual std::string typeName() {return "YACS__ENGINE__OutputCorbaPort";}
88 virtual std::string valToStr();
89 virtual void valFromStr(std::string valstr);