-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023 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
{
}
-void InputToyPort::put(const void *data) throw(ConversionException)
+void InputToyPort::put(const void *data)
{
put((Any *)data);
}
return _initData!=0;
}
-void *InputToyPort::get() const throw(YACS::Exception)
+void *InputToyPort::get() const
{
return (void *)_data;
}
return new InputToyPort(*this,newHelder);
}
-void InputToyPort::put(Any *data)
+void InputToyPort::releaseData()
{
if(_data)
_data->decrRef();
+ _data=nullptr;
+}
+
+void InputToyPort::put(Any *data)
+{
+ InputToyPort::releaseData();
_data=data;
_data->incrRef();
}
_data=other._data->clone();
}
-void OutputToyPort::put(const void *data) throw(ConversionException)
+void OutputToyPort::put(const void *data)
{
put((Any *)data);
OutputPort::put(data);
return ElementaryNode::getNumberOfInputPorts()+1;
}
-OutputPort *ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception)
+OutputPort *ToyNode::getOutputPort(const std::string& name) const
{
if(name==NAME_FOR_NB)
return (OutputPort *)&_nbOfInputsPort;
return ret;
}
-InputPort *SeqToyNode::getInputPort(const std::string& name) const throw(YACS::Exception)
+InputPort *SeqToyNode::getInputPort(const std::string& name) const
{
if(name==NAME_NBOFELTS_INSEQ_INPRT)
return (InputPort *)&_inIntValue;
return ret;
}
-OutputPort *SeqToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception)
+OutputPort *SeqToyNode::getOutputPort(const std::string& name) const
{
if(name==NAME_SEQ_OUTPRT)
return (OutputPort *)&_seqOut;
return ret;
}
-InputPort *Seq2ToyNode::getInputPort(const std::string& name) const throw(YACS::Exception)
+InputPort *Seq2ToyNode::getInputPort(const std::string& name) const
{
if(name==NAME_SEQ_INPRT1)
return (InputPort *)&_inValue1;
return ret;
}
-OutputPort *Seq2ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception)
+OutputPort *Seq2ToyNode::getOutputPort(const std::string& name) const
{
if(name==NAME_SEQ_OUTPRT)
return (OutputPort *)&_seqOut;
return ret;
}
-InputPort *Seq3ToyNode::getInputPort(const std::string& name) const throw(YACS::Exception)
+InputPort *Seq3ToyNode::getInputPort(const std::string& name) const
{
if(name==NAME_SEQ_INPRT1)
return (InputPort *)&_inValue1;
return ret;
}
-OutputPort *Seq3ToyNode::getOutputPort(const std::string& name) const throw(YACS::Exception)
+OutputPort *Seq3ToyNode::getOutputPort(const std::string& name) const
{
if(name==NAME_SEQ_OUTPRT)
return (OutputPort *)&_seqOut;
{
}
-void InputLimitPort::put(const void *data) throw(ConversionException)
+void InputLimitPort::put(const void *data)
{
put((Any *)data);
}
return _initData!=0;
}
-void *InputLimitPort::get() const throw(YACS::Exception)
+void *InputLimitPort::get() const
{
if(!_data)
{
InputPort::edRemoveManInit();
}
-void InputLimitPort::put(Any *data)
+void InputLimitPort::releaseData()
{
if(_data)
_data->decrRef();
+ _data=nullptr;
+}
+
+void InputLimitPort::put(Any *data)
+{
+ InputLimitPort::releaseData();
_data=data;
_data->incrRef();
}
{
}
-void OutputLimitPort::put(const void *data) throw(ConversionException)
+void OutputLimitPort::put(const void *data)
{
put((Any *)data);
OutputPort::put(data);
return ret;
}
-InputPort *LimitNode::getInputPort(const std::string& name) const throw(YACS::Exception)
+InputPort *LimitNode::getInputPort(const std::string& name) const
{
if(name==NAME_FOR_SWPORT)
return (InputPort *)&_entry;
return ElementaryNode::getInputPort(name);
}
-OutputPort *LimitNode::getOutputPort(const std::string& name) const throw(YACS::Exception)
+OutputPort *LimitNode::getOutputPort(const std::string& name) const
{
if(name==NAME_FOR_SWPORT)
return (OutputPort *)&_switchPort;