[Ns-developers] get value of a GlobalVariable

Nicola Baldo nbaldo at cttc.es
Fri Jul 3 04:37:37 PDT 2009



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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ns-3-global-value-get-value-by-name-v2.patch
Type: text/x-patch
Size: 2077 bytes
Desc: not available
Url : http://mailman.isi.edu/pipermail/ns-developers/attachments/20090703/b75c095d/ns-3-global-value-get-value-by-name-v2.bin


More information about the Ns-developers mailing list