X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FNode.cxx;fp=src%2Fengine%2FNode.cxx;h=31c2df78e7587272b7d0666d0085c33cd7800ff9;hb=54dd4bca5d0eb605fae21321a06bbdee31dbe886;hp=b8c40da7fb1cf92772c9738ef3a3342791d5d43f;hpb=91d96e686c409f996c72474e934476f0ccb5e239;p=modules%2Fyacs.git diff --git a/src/engine/Node.cxx b/src/engine/Node.cxx index b8c40da7f..31c2df78e 100644 --- a/src/engine/Node.cxx +++ b/src/engine/Node.cxx @@ -107,13 +107,49 @@ void Node::init(bool start) setState(YACS::READY); } +/*! + * This method clones \a this by : + * + * - deep copying nodes, links, ports, types + * - containers are either deep copied or shallow copied depending on _isAttachedOnCloning attribute. + * - component are either deep copied or shallow copied depending on _isAttachedOnCloning attribute. + * + * So \b this \b method \b clone \b is \b dedicated \b for \b DynParaLoop \b class \b or \b subclasses. + * It \b should \b not \b be \b used \b elsewhere, because + * _isAttachedOnCloning attribute is an attribute in the engine not for GUI/TUI aspects. + * For GUI/TUI manipulation cloneWithoutCompAndContDeepCpy method should be used preferably. + * + * \param [in] father - The new father of the returned clone. + * \param [in] editionOnly ignored + * + * \sa cloneWithoutCompAndContDeepCpy + */ Node *Node::clone(ComposedNode *father, bool editionOnly) const { - Node *ret=simpleClone(father,editionOnly); + Node *ret(simpleClone(father,editionOnly)); ret->performDuplicationOfPlacement(*this); return ret; } +/*! + * This method clones \a this by : + * - deep copying nodes, links, ports, types + * - shallow copy containers + * - shallow copy components + * + * So this method simply ignores isAttachedOnCloning attribute for both containers and components. + * So this method is dedicated for the GUI/TUI users. + * + * \param [in] father - The new father of the returned clone. + * \param [in] editionOnly ignored + */ +Node *Node::cloneWithoutCompAndContDeepCpy(ComposedNode *father, bool editionOnly) const +{ + Node *ret(simpleClone(father,editionOnly)); + ret->performShallowDuplicationOfPlacement(*this); + return ret; +} + //! Change the name of the node /*! * raise an exception if the name is already used in the scope of its father