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 __SERVICENODE_HXX__
21 #define __SERVICENODE_HXX__
23 #include "YACSlibEngineExport.hxx"
24 #include "ElementaryNode.hxx"
32 class ComponentInstance;
34 class YACSLIBENGINE_EXPORT ServiceNode : public ElementaryNode
37 ServiceNode(const std::string& name);
38 ServiceNode(const ServiceNode& other, ComposedNode *father);
39 void performDuplicationOfPlacement(const Node& other);
40 void performShallowDuplicationOfPlacement(const Node& other);
43 virtual bool isDeployable() const;
44 virtual void setComponent(ComponentInstance* compo) throw(Exception);
45 virtual ComponentInstance *getComponent();
46 virtual const ComponentInstance *getComponent() const;
47 virtual Container *getContainer();
48 virtual void setRef(const std::string& ref);
49 virtual std::string getRef();
50 virtual void setMethod(const std::string& method) { _method=method; }
51 virtual std::string getMethod(){return _method;}
52 virtual ServiceNode *createNode(const std::string& name) = 0;
53 virtual ~ServiceNode();
54 virtual void accept(Visitor *visitor);
55 virtual std::string getKind() const;
56 virtual std::string typeName() { return "YACS__ENGINE__ServiceNode"; }
58 static const char KIND[];
60 ComponentInstance *_component;