[AGENT++] Asn1 class hierarchy and smival

Jochen Katz katz at agentpp.com
Thu Mar 23 16:40:02 CET 2017


Hello,

> one question design oriented. Why the smival is included in the abstract
> interface of SnmpSyntax?

because Jeff Meyer designed it that way and nobody changed it until now ;-)

> Unless I am missing something,  the smival can
> be propagated into the child classes, based on the needs without
> breaking the design which is covered by the abstract interface. The
> problem rises from the size of to the produced classes/objects which
> inherit the smival while it's not used.

Are there any classes that inherit from SnmpSyntax that do not use
smival to store the value?

> For example
> 
>  SnmpSyntax::get_syntax() =0
> 
> provides the syntax of the type, why it should be carried around in
> smival too?

The smival is passed to other functions and these no longer have access
to the SnmpSyntax subclass, but need to know the syntax.

Regards,
  Jochen




More information about the AGENTPP mailing list