X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FConditionInputPort.cxx;h=0929d11089be426c43d95edb04c67c0335ae6b14;hb=3faa9bfe96ae74fdca18143c639dcfb9b41cd43e;hp=1d0280d96ae20829fb57e4e59298789c7b30eac0;hpb=802458daad8b198beabbb058dc87437bdc63b1a3;p=modules%2Fyacs.git diff --git a/src/engine/ConditionInputPort.cxx b/src/engine/ConditionInputPort.cxx index 1d0280d96..0929d1108 100644 --- a/src/engine/ConditionInputPort.cxx +++ b/src/engine/ConditionInputPort.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2015 CEA/DEN, EDF R&D +// Copyright (C) 2006-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -73,7 +73,7 @@ bool ConditionInputPort::isLinkedOutOfScope() const return _outOfScopeBackLink!=0; } -void ConditionInputPort::edNotifyReferencedBy(OutPort *fromPort) +void ConditionInputPort::edNotifyReferencedBy(OutPort *fromPort, bool isLoopProof) { if(!((ComposedNode*)(_node))->isInMyDescendance(fromPort->getNode())) { @@ -81,7 +81,7 @@ void ConditionInputPort::edNotifyReferencedBy(OutPort *fromPort) throw Exception("ConditionInputPort::edNotifyReferenced : already linked from outside"); _outOfScopeBackLink=fromPort; } - InputPort::edNotifyReferencedBy(fromPort); + InputPort::edNotifyReferencedBy(fromPort,isLoopProof); } void ConditionInputPort::edNotifyDereferencedBy(OutPort *fromPort) @@ -99,15 +99,21 @@ void *ConditionInputPort::get() const return (void *)_value; } -void ConditionInputPort::put(const void *data) throw(ConversionException) +void ConditionInputPort::put(const void *data) { put((Any*)data); } -void ConditionInputPort::put(Any *data) throw(ConversionException) +void ConditionInputPort::releaseData() { if(_value) _value->decrRef(); + _value=nullptr; +} + +void ConditionInputPort::put(Any *data) +{ + ConditionInputPort::releaseData(); _value=data; _value->incrRef(); }