SNMP++  3.3.4
Counter32 Class Reference

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

#include <counter.h>

Inheritance diagram for Counter32:
Collaboration diagram for Counter32:

Public Member Functions

 Counter32 (const unsigned long i=0)
 Constructor with a value - defaults to 0. More...
 
 Counter32 (const Counter32 &c)
 Copy constructor. More...
 
SmiUINT32 get_syntax () const
 Return the syntax. More...
 
SnmpSyntaxclone () const
 Clone operator. More...
 
Counter32operator= (const Counter32 &uli)
 Overloaded assignment for Counter32. More...
 
Counter32operator= (const unsigned long ul)
 Overloaded assignment for unsigned longs. 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 counter class allows all the functionality of unsigned integers but is recognized as a distinct SMI type.

Counter32 class objects may be set or get into Vb objects.

Definition at line 71 of file counter.h.

Constructor & Destructor Documentation

Counter32::Counter32 ( const unsigned long  i = 0)
inline

Constructor with a value - defaults to 0.

Parameters
i- unsigned 32 bit value

Definition at line 86 of file counter.h.

References sNMP_SYNTAX_CNTR32.

Counter32::Counter32 ( const Counter32 c)
inline

Copy constructor.

Parameters
c- Object to copy from

Definition at line 97 of file counter.h.

References sNMP_SYNTAX_CNTR32.

Member Function Documentation

SnmpSyntax* Counter32::clone ( ) const
inlinevirtual

Clone operator.

Returns
Pointer to a newly created copy of the object.

Reimplemented from SnmpUInt32.

Definition at line 115 of file counter.h.

SmiUINT32 Counter32::get_syntax ( ) const
inlinevirtual

Return the syntax.

Returns
Returns always sNMP_SYNTAX_CNTR32

Reimplemented from SnmpUInt32.

Definition at line 108 of file counter.h.

References sNMP_SYNTAX_CNTR32.

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

Overloaded assignment for Counter32.

Parameters
uli- new value
Returns
self reference

Definition at line 129 of file counter.h.

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

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

Overloaded assignment for unsigned longs.

Parameters
ul- new value
Returns
self reference

Definition at line 143 of file counter.h.

References SnmpUInt32::operator=().


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