-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016 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
using namespace YACS::ENGINE;
-ServerNode::ServerNode(const std::string& name):InlineFuncNode(name),_container(0)
+ServerNode::ServerNode(const std::string& name):InlineFuncNode(name)
{
}
-ServerNode::ServerNode(const ServerNode& other, ComposedNode *father):InlineFuncNode(other,father),_container(0)
+ServerNode::ServerNode(const ServerNode& other, ComposedNode *father):InlineFuncNode(other,father)
{
}
-void ServerNode::performDuplicationOfPlacement(const Node& other)
-{
- const ServerNode &otherC=*(dynamic_cast<const ServerNode *>(&other));
- //if other has no container don't clone: this will not have one
- if(otherC._container)
- _container=otherC._container->clone();
-}
-
void ServerNode::load()
{
if(_container)
{
- if(!_container->isAlreadyStarted(0))
+ if(!_container->isAlreadyStarted(this))
{
try
{
- _container->start(0);
+ _container->start(this);
}
catch(Exception& e)
{
visitor->visitServerNode(this);
}
-void ServerNode::setContainer(Container *container)
-{
- if(_container==container)
- return ;
- if(_container)
- _container->decrRef();
- _container=container;
- if(_container)
- _container->incrRef();
- modified();
-}
-
//! By definition of ServerNode class.
bool ServerNode::isDeployable() const
{
ServerNode::~ServerNode()
{
- if(_container)
- _container->decrRef();
}
+