-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2015 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
_component=otherC._component->clone();
}
+void ServiceNode::performShallowDuplicationOfPlacement(const Node& other)
+{
+ const ServiceNode &otherC=*(dynamic_cast<const ServiceNode *>(&other));
+ //if other has no component don't clone: this will not have one
+ if(otherC._component)
+ {
+ _component=otherC._component;
+ _component->incrRef();
+ }
+}
+
ServiceNode::~ServiceNode()
{
if(_component)
return _component;
}
+const ComponentInstance *ServiceNode::getComponent() const
+{
+ return _component;
+}
+
//! Return the associated container
Container *ServiceNode::getContainer()
{
if(compo)
{
DEBTRACE(compo->getInstanceName());
- if(compo->getKind() != this->getKind())
+ if(compo->getKindForNode() != this->getKind())
{
//Not allowed
std::string what("ServiceNode::setComponent : component instance kind not allowed ");