SNMP++  3.3.4
SnmpSyntax Class Referenceabstract

An "abstract" (pure virtual) class that serves as the base class for all specific SNMP syntax types. More...

#include <smival.h>

Inheritance diagram for SnmpSyntax:
Collaboration diagram for SnmpSyntax:

Public Member Functions

virtual const char * get_printable () const =0
 Virtual function for getting a printable ASCII value for any SNMP value. More...
 
virtual SmiUINT32 get_syntax () const =0
 Return the current syntax. More...
 
virtual SnmpSyntaxclone () const =0
 Virtual clone operation for creating a new Value from an existing value. More...
 
virtual ~SnmpSyntax ()
 Virtual destructor to ensure deletion of derived classes... More...
 
virtual SnmpSyntaxoperator= (const SnmpSyntax &)=0
 Overloaded assignment operator. More...
 
virtual bool valid () const =0
 Return validity of the object. More...
 
virtual int get_asn1_length () const =0
 Return the space needed for serialization. More...
 
virtual void clear ()=0
 Reset the object. More...
 

Protected Member Functions

 SnmpSyntax ()
 

Protected Attributes

SmiVALUE smival
 

Detailed Description

An "abstract" (pure virtual) class that serves as the base class for all specific SNMP syntax types.

Definition at line 116 of file smival.h.

Constructor & Destructor Documentation

virtual SnmpSyntax::~SnmpSyntax ( )
inlinevirtual

Virtual destructor to ensure deletion of derived classes...

Definition at line 147 of file smival.h.

SnmpSyntax::SnmpSyntax ( )
inlineprotected

Definition at line 175 of file smival.h.

Member Function Documentation

virtual void SnmpSyntax::clear ( )
pure virtual

Reset the object.

Implemented in GenAddress, Oid, UdpAddress, IpAddress, OctetStr, SnmpInt32, Address, Counter64, and SnmpUInt32.

virtual SnmpSyntax* SnmpSyntax::clone ( ) const
pure virtual

Virtual clone operation for creating a new Value from an existing value.

Note
The caller MUST use the delete operation on the return value when done.

Implemented in GenAddress, Oid, UdpAddress, OpaqueStr, IpAddress, SnmpInt32, OctetStr, Counter64, SnmpUInt32, TimeTicks, Gauge32, and Counter32.

Referenced by Vb::set_value().

virtual int SnmpSyntax::get_asn1_length ( ) const
pure virtual

Return the space needed for serialization.

Implemented in GenAddress, UdpAddress, IpAddress, SnmpInt32, Counter64, OctetStr, Oid, Address, and SnmpUInt32.

virtual const char* SnmpSyntax::get_printable ( ) const
pure virtual

Virtual function for getting a printable ASCII value for any SNMP value.

Note
The returned string is valid as long as the object is not modified.
This function is NOT thread safe.

Implemented in GenAddress, UdpAddress, Oid, IpAddress, SnmpInt32, OctetStr, Counter64, SnmpUInt32, and TimeTicks.

virtual SmiUINT32 SnmpSyntax::get_syntax ( ) const
pure virtual

Return the current syntax.

Implemented in GenAddress, UdpAddress, OpaqueStr, IpAddress, SnmpInt32, OctetStr, Counter64, Oid, SnmpUInt32, Gauge32, TimeTicks, and Counter32.

virtual SnmpSyntax& SnmpSyntax::operator= ( const SnmpSyntax )
pure virtual

Overloaded assignment operator.

Note
This should be pure virtual, but buggy VC++ compiler complains about unresolved reference at link time. XXX probably happens because it's not implemented in all derived classes?

Implemented in GenAddress, Oid, UdpAddress, OpaqueStr, IpAddress, SnmpInt32, OctetStr, Counter64, and SnmpUInt32.

virtual bool SnmpSyntax::valid ( ) const
pure virtual

Return validity of the object.

Implemented in Oid, SnmpInt32, Counter64, OctetStr, Address, and SnmpUInt32.

Member Data Documentation


The documentation for this class was generated from the following file: