[Ns-developers] get value of a GlobalVariable
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Thu Jul 2 11:26:19 PDT 2009
On Thu, 2009-07-02 at 18:39 +0200, Nicola Baldo wrote:
> > I don't think so but I guess we could add void
> > GlobalValue::GetValueByName (std::string name, AttributeValue
> > &value). Care to cook a patch ?
>
> Patch attached. If it is ok I can commit it to ns-3-dev.
I don't have the code handy but I believe that the convention followed
in this global-value.cc file as well as the attribute code is to
NS_FATAL_ERROR if the requested operation cannot be completed. There is
thus no need to return bool from that function. Usually, there is a
FailSafe variant with the bool return value and the non-FailSafe
function is implemented by a call to the FailSafe version.
Mathieu
More information about the Ns-developers
mailing list