[Ns-developers] get value of a GlobalVariable

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Fri Jul 3 04:38:22 PDT 2009


please, commit.

Mathieu

On Fri, 2009-07-03 at 13:37 +0200, Nicola Baldo wrote:
> 
> Mathieu Lacage wrote:
> > 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.
> > 
> 
> Ok, here is a revised version of the patch. Just let me know...
> 
> Nicola
> 
> 



More information about the Ns-developers mailing list