1 // Copyright (C) 2006-2014 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, or (at your option) any later version.
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
20 #ifndef _CORBAPORTS_HXX_
21 #define _CORBAPORTS_HXX_
23 #include <omniORB4/CORBA.h>
25 #include "YACSRuntimeSALOMEExport.hxx"
26 #include "InputPort.hxx"
27 #include "OutputPort.hxx"
36 /*! \brief Class for CORBA Input Ports
42 class YACSRUNTIMESALOME_EXPORT InputCorbaPort : public InputPort
45 InputCorbaPort(const std::string& name, Node *node, TypeCode * type);
46 InputCorbaPort(const InputCorbaPort& other, Node *newHelder);
47 virtual ~InputCorbaPort();
48 bool edIsManuallyInitialized() const;
49 void edRemoveManInit();
50 virtual void put(const void *data) throw(ConversionException);
51 void put(CORBA::Any *data) throw (ConversionException);
52 InputPort *clone(Node *newHelder) const;
53 void *get() const throw(Exception);
54 virtual bool isEmpty();
55 virtual CORBA::Any * getAny();
56 virtual std::string getAsString();
57 virtual PyObject* getPyObj();
58 virtual void exSaveInit();
59 virtual void exRestoreInit();
60 virtual std::string dump();
61 virtual std::string typeName() {return "YACS__ENGINE__InputCorbaPort";}
62 virtual std::string valToStr();
63 virtual void valFromStr(std::string valstr);
66 CORBA::Any * _initData;
69 YACS::BASES::Mutex _mutex;
72 class OutputCorbaPort;
74 YACSRUNTIMESALOME_EXPORT std::ostream & operator<<(std::ostream &os,
75 const YACS::ENGINE::OutputCorbaPort& p);
77 class YACSRUNTIMESALOME_EXPORT OutputCorbaPort : public OutputPort
79 friend std::ostream &operator<< ( std::ostream &os,
80 const OutputCorbaPort& p);
82 OutputCorbaPort(const std::string& name, Node *node, TypeCode * type);
83 OutputCorbaPort(const OutputCorbaPort& other, Node *newHelder);
84 virtual ~OutputCorbaPort();
85 virtual void put(const void *data) throw(ConversionException);
86 void put(CORBA::Any *data) throw (ConversionException);
87 OutputPort *clone(Node *newHelder) const;
88 virtual CORBA::Any * getAny();
89 virtual CORBA::Any * getAnyOut();
90 virtual std::string getAsString();
91 virtual PyObject* getPyObj();
92 virtual std::string dump();
93 virtual std::string typeName() {return "YACS__ENGINE__OutputCorbaPort";}
94 virtual std::string valToStr();
95 virtual void valFromStr(std::string valstr);
100 YACS::BASES::Mutex _mutex;