Salome HOME
bos #26458 Versioning of sources via git commit id (sha1)
[modules/yacs.git] / src / engine / ServiceNode.hxx
index 9db9bb68542055b978dfe8ece71c74c71ab37c14..92f1b719176c8374ff3ba461c6b8b08a98ca49cc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -31,30 +31,33 @@ namespace YACS
   {
     class ComponentInstance;
 
-    class YACSLIBENGINE_EXPORT ServiceNode: public ElementaryNode 
+    class YACSLIBENGINE_EXPORT ServiceNode : public ElementaryNode
     {
     protected:
       ServiceNode(const std::string& name);
       ServiceNode(const ServiceNode& other, ComposedNode *father);
       void performDuplicationOfPlacement(const Node& other);
+      void performShallowDuplicationOfPlacement(const Node& other);
     public:
       virtual void load();
       virtual bool isDeployable() const;
-      virtual void setComponent(ComponentInstance* compo) throw(Exception);
+      virtual void setComponent(ComponentInstance* compo) ;
       virtual ComponentInstance *getComponent();
+      virtual const ComponentInstance *getComponent() const;
       virtual Container *getContainer();
       virtual void setRef(const std::string& ref);
       virtual std::string getRef();
-      virtual void setMethod(const std::string& method){ _method=method; }
+      virtual void setMethod(const std::string& method) { _method=method; }
       virtual std::string getMethod(){return _method;}
       virtual ServiceNode *createNode(const std::string& name) = 0;
       virtual ~ServiceNode();
       virtual void accept(Visitor *visitor);
       virtual std::string getKind() const;
+      virtual std::string typeName() { return "YACS__ENGINE__ServiceNode"; }
+    public:
       static const char KIND[];
-      virtual std::string typeName() {return "YACS__ENGINE__ServiceNode";}
     protected:
-      ComponentInstance_component;
+      ComponentInstance *_component;
       std::string _method;
       std::string _ref;
     };