SNMP++  3.3.4
SnmpUInt32 Class Reference

32 bit unsigned integer class. More...

#include <integer.h>

Inheritance diagram for SnmpUInt32:
Collaboration diagram for SnmpUInt32:

Public Member Functions

 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...
 
virtual SmiUINT32 get_syntax () const
 Return the syntax. 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...
 
virtual SnmpSyntaxclone () const
 Clone operator. 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...
 

Protected Attributes

bool valid_flag
 
SNMP_PP_MUTABLE char output_buffer [INTOUTBUF]
 
SNMP_PP_MUTABLE bool m_changed
 
- Protected Attributes inherited from SnmpSyntax
SmiVALUE smival
 

Additional Inherited Members

- Protected Member Functions inherited from SnmpSyntax
 SnmpSyntax ()
 

Detailed Description

32 bit unsigned integer class.

The integer class allows all the functionality of the various integers but is contained in a Value object for consistency among the various types. class objects may be set or get into Vb objects.

Definition at line 77 of file integer.h.

Constructor & Destructor Documentation

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

Constructor with value (defaults to 0).

Parameters
i- initial value

Definition at line 86 of file integer.h.

References sNMP_SYNTAX_UINT32.

SnmpUInt32::SnmpUInt32 ( const SnmpUInt32 c)
inline

Copy constructor.

Parameters
c- initial value

Definition at line 100 of file integer.h.

References SnmpSyntax::smival, sNMP_SYNTAX_UINT32, SmiVALUE::uNumber, and SmiVALUE::value.

virtual SnmpUInt32::~SnmpUInt32 ( )
inlinevirtual

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

Definition at line 112 of file integer.h.

Member Function Documentation

void SnmpUInt32::clear ( )
inlinevirtual

Reset the object.

Implements SnmpSyntax.

Definition at line 192 of file integer.h.

virtual SnmpSyntax* SnmpUInt32::clone ( ) const
inlinevirtual

Clone operator.

Returns
Pointer to a newly created copy of the object.

Implements SnmpSyntax.

Reimplemented in TimeTicks, Gauge32, and Counter32.

Definition at line 174 of file integer.h.

int SnmpUInt32::get_asn1_length ( ) const
virtual

Return the space needed for serialization.

Implements SnmpSyntax.

virtual const char* SnmpUInt32::get_printable ( ) const
virtual

Get a printable ASCII value.

Implements SnmpSyntax.

Reimplemented in TimeTicks.

virtual SmiUINT32 SnmpUInt32::get_syntax ( ) const
inlinevirtual

Return the syntax.

Returns
This method always returns sNMP_SYNTAX_UINT32.

Implements SnmpSyntax.

Reimplemented in Gauge32, TimeTicks, and Counter32.

Definition at line 119 of file integer.h.

References sNMP_SYNTAX_UINT32.

SnmpUInt32::operator unsigned long ( ) const
inline

Behave like an unsigned long.

Returns
value as unsigned long

Definition at line 162 of file integer.h.

SnmpUInt32& SnmpUInt32::operator= ( const unsigned long  i)
inline

Overloaded assignment for unsigned longs.

Parameters
i- new value
Returns
self reference

Definition at line 127 of file integer.h.

Referenced by Counter32::operator=(), Gauge32::operator=(), and TimeTicks::operator=().

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

Overloaded assignment for SnmpUInt32.

Parameters
uli- new value
Returns
self reference

Definition at line 141 of file integer.h.

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

SnmpSyntax& SnmpUInt32::operator= ( const SnmpSyntax val)
virtual

Map other SnmpSyntax objects to SnmpUInt32.

Implements SnmpSyntax.

bool SnmpUInt32::valid ( ) const
inlinevirtual

Return validity of the object.

An SnmpUInt32 will only be invalid after a failed asignment of another SnmpSyntax object.

Implements SnmpSyntax.

Definition at line 182 of file integer.h.

Member Data Documentation

SNMP_PP_MUTABLE bool SnmpUInt32::m_changed
protected

Definition at line 198 of file integer.h.

SNMP_PP_MUTABLE char SnmpUInt32::output_buffer[INTOUTBUF]
protected

Definition at line 197 of file integer.h.

bool SnmpUInt32::valid_flag
protected

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