Version: 9.16.0
ServiceNode.hxx
Go to the documentation of this file.
1// Copyright (C) 2006-2026 CEA, EDF
2//
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.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef __SERVICENODE_HXX__
21#define __SERVICENODE_HXX__
22
24#include "ElementaryNode.hxx"
25
26#include <string>
27
28namespace YACS
29{
30 namespace ENGINE
31 {
32 class ComponentInstance;
33
35 {
36 protected:
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);
41 public:
42 virtual void load();
43 virtual bool isDeployable() const;
44 virtual void setComponent(ComponentInstance* compo) ;
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"; }
57 public:
58 static const char KIND[];
59 protected:
61 std::string _method;
62 std::string _ref;
63 };
64 }
65}
66
67#endif
#define YACSLIBENGINE_EXPORT
Base class for all component instances.
Base class for all composed nodes.
Base class for all calculation nodes.
Base class for all nodes.
Definition: Node.hxx:70
Class for calculation node associated with a component service.
Definition: ServiceNode.hxx:35
virtual std::string getMethod()
Definition: ServiceNode.hxx:51
virtual std::string typeName()
Definition: ServiceNode.hxx:56
virtual void setMethod(const std::string &method)
Definition: ServiceNode.hxx:50
ComponentInstance * _component
Definition: ServiceNode.hxx:60
virtual ServiceNode * createNode(const std::string &name)=0
def ref(target, callback=None)
Definition: CONNECTOR.py:120