Oidx in Agent++
Frank Fock
Frank.Fock____t-online.de
Wed Jul 11 00:51:48 CEST 2001
Alex,
You are right. The 0 is a valid sub-identifier. But what
should these operations return when the OID is invalid?
If you are not sure whether the OID you are processing
is valid or not you should call Oidx::valid() before you
call one of the below methods. They are just returning
0 to avoid crashes if invalid OIDs are used.
Best regards,
Frank
Alex Finogenov wrote:
> Frank,
>
> In the Agent++ "unsigned long Oidx::last()" and "unsigned long
> Oidx::operator[]" return a value of 0 when the Oidx
> object is in valid (valid() fails).
>
> Can't this create a problem since the value 0 is a valid value for a scalar
> Oid's last subidentifier?
>
> Thanks,
> Alex
--
Frank Fock - AGENT++
Email: fock____agentpp.com
Fax: +49 7195 177108
More information about the AGENTPP
mailing list