SNMP++  3.3.4
Gauge32 Class Reference

The gauge class allows all the functionality of unsigned integers but is recognized as a distinct SMI type. More...

#include <gauge.h>

Inheritance diagram for Gauge32:
Collaboration diagram for Gauge32:

Public Member Functions

 Gauge32 (const unsigned long ul=0)
 Constructs a valid Gauge32 with the given value. More...
 
 Gauge32 (const Gauge32 &g32)
 Copy constructor. More...
 
 ~Gauge32 ()
 Destructor (ensure that SnmpUInt32::~SnmpUInt32() is overridden). More...
 
SmiUINT32 get_syntax () const
 Get the Syntax of the object. More...
 
SnmpSyntaxclone () const
 Clone the object. More...
 
Gauge32operator= (const Gauge32 &uli)
 Assign a Gauge32 to a Gauge32. More...
 
Gauge32operator= (const unsigned long ul)
 Assign a unsigned long to a Gauge32. More...
 
- Public Member Functions inherited from SnmpUInt32
 SnmpUInt32 (const unsigned long i=0)
 Constructor with value (defaults to 0). More...
 
 SnmpUInt32 (const SnmpUInt32 &c)
 Copy constructor. More...
 
virtual ~SnmpUInt32 ()
 Destructor (ensure that SnmpSyntax::~SnmpSyntax() is overridden). More...
 
SnmpUInt32operator= (const unsigned long i)
 Overloaded assignment for unsigned longs. More...
 
SnmpUInt32operator= (const SnmpUInt32 &uli)
 Overloaded assignment for SnmpUInt32. More...
 
SnmpSyntaxoperator= (const SnmpSyntax &val)
 Map other SnmpSyntax objects to SnmpUInt32. More...
 
 operator unsigned long () const
 Behave like an unsigned long. More...
 
virtual const char * get_printable () const
 Get a printable ASCII value. More...
 
bool valid () const
 Return validity of the object. More...
 
int get_asn1_length () const
 Return the space needed for serialization. More...
 
void clear ()
 Reset the object. More...
 
- Public Member Functions inherited from SnmpSyntax
virtual ~SnmpSyntax ()
 Virtual destructor to ensure deletion of derived classes... More...
 

Additional Inherited Members

- Protected Member Functions inherited from SnmpSyntax
 SnmpSyntax ()
 
- Protected Attributes inherited from SnmpUInt32
bool valid_flag
 
SNMP_PP_MUTABLE char output_buffer [INTOUTBUF]
 
SNMP_PP_MUTABLE bool m_changed
 
- Protected Attributes inherited from SnmpSyntax
SmiVALUE smival
 

Detailed Description

The gauge class allows all the functionality of unsigned integers but is recognized as a distinct SMI type.

Gauge32 objects may be set or get into Vb objects.

Definition at line 70 of file gauge.h.

Constructor & Destructor Documentation

Gauge32::Gauge32 ( const unsigned long  ul = 0)
inline

Constructs a valid Gauge32 with the given value.

Parameters
ul- value (0..MAX_UINT32)

Definition at line 87 of file gauge.h.

References sNMP_SYNTAX_GAUGE32.

Gauge32::Gauge32 ( const Gauge32 g32)
inline

Copy constructor.

Parameters
g32- value

Definition at line 98 of file gauge.h.

References sNMP_SYNTAX_GAUGE32.

Gauge32::~Gauge32 ( )
inline

Destructor (ensure that SnmpUInt32::~SnmpUInt32() is overridden).

Definition at line 107 of file gauge.h.

Member Function Documentation

SnmpSyntax* Gauge32::clone ( ) const
inlinevirtual

Clone the object.

Returns
A cloned Gauge32 object allocated through new.

Reimplemented from SnmpUInt32.

Definition at line 123 of file gauge.h.

SmiUINT32 Gauge32::get_syntax ( ) const
inlinevirtual

Get the Syntax of the object.

Returns
This method always returns sNMP_SYNTAX_GAUGE32.

Reimplemented from SnmpUInt32.

Definition at line 116 of file gauge.h.

References sNMP_SYNTAX_GAUGE32.

Gauge32& Gauge32::operator= ( const Gauge32 uli)
inline

Assign a Gauge32 to a Gauge32.

Definition at line 132 of file gauge.h.

References SnmpSyntax::smival, SmiVALUE::uNumber, SnmpUInt32::valid_flag, and SmiVALUE::value.

Gauge32& Gauge32::operator= ( const unsigned long  ul)
inline

Assign a unsigned long to a Gauge32.

Parameters
ul- New value

Definition at line 145 of file gauge.h.

References SnmpUInt32::operator=().


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