1 // Copyright (C) 2006-2021 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 __INPROPERTYPORT_HXX__
21 #define __INPROPERTYPORT_HXX__
24 #include "InputPort.hxx"
32 /*! \brief class for Input Property Ports
37 class YACSLIBENGINE_EXPORT InPropertyPort : public InputPort
39 friend class Runtime; // for port creation
44 static const char NAME[];
46 virtual ~InPropertyPort();
48 std::string getNameOfTypeOfCurrentInstance() const;
49 //! returns the final physical port behind 'this'.
51 virtual InPort *getPublicRepresentant() { return this; }
53 virtual InPropertyPort *getPublicRepresentant() { return this; }
55 virtual std::string typeName() {return "YACS__ENGINE__InPropertyPort";}
56 virtual void exNewPropertyValue(const std::string & name, const std::string & value);
58 virtual void exSaveInit();
59 virtual void exRestoreInit();
60 virtual InPropertyPort *clone(Node *newHelder) const;
61 virtual void *get() const;
62 virtual void put(const void *data);
63 virtual void put(YACS::ENGINE::Any *data);
64 void releaseData() override;
66 InPropertyPort(const InPropertyPort& other, Node *newHelder);
67 InPropertyPort(const std::string& name, Node *node, TypeCode* type, bool canBeNull = false);
69 YACS::ENGINE::Any* _property_data;
70 YACS::ENGINE::Any* _init_property_data;