SNMP++  3.3.4
SnmpInt32 Class Reference

32 bit signed integer class. More...

#include <integer.h>

Inheritance diagram for SnmpInt32:
Collaboration diagram for SnmpInt32:

Public Member Functions

 SnmpInt32 (const long i=0)
 Constructor with value. More...
 
 SnmpInt32 (const SnmpInt32 &c)
 Copy constructor. More...
 
virtual ~SnmpInt32 ()
 Destructor (ensure that SnmpSyntax::~SnmpSyntax() is overridden). More...
 
virtual SmiUINT32 get_syntax () const
 Return the syntax. More...
 
SnmpInt32operator= (const long i)
 Overloaded assignment for longs. More...
 
SnmpInt32operator= (const SnmpInt32 &li)
 Overloaded assignment for SnmpInt32. More...
 
SnmpSyntaxoperator= (const SnmpSyntax &val)
 Map other SnmpSyntax objects to SnmpInt32. More...
 
 operator long () const
 Behave like an long. More...
 
const char * get_printable () const
 Get a printable ASCII value. More...
 
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 signed integer class.

Definition at line 205 of file integer.h.

Constructor & Destructor Documentation

SnmpInt32::SnmpInt32 ( const long  i = 0)
inline

Constructor with value.

Parameters
i- initial value

Definition at line 220 of file integer.h.

References sNMP_SYNTAX_INT32.

SnmpInt32::SnmpInt32 ( const SnmpInt32 c)
inline

Copy constructor.

Parameters
c- initial value

Definition at line 234 of file integer.h.

References SnmpSyntax::smival, sNMP_SYNTAX_INT32, SmiVALUE::sNumber, and SmiVALUE::value.

virtual SnmpInt32::~SnmpInt32 ( )
inlinevirtual

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

Definition at line 246 of file integer.h.

Member Function Documentation

void SnmpInt32::clear ( )
inlinevirtual

Reset the object.

Implements SnmpSyntax.

Definition at line 325 of file integer.h.

SnmpSyntax* SnmpInt32::clone ( ) const
inlinevirtual

Clone operator.

Returns
Pointer to a newly created copy of the object.

Implements SnmpSyntax.

Definition at line 308 of file integer.h.

int SnmpInt32::get_asn1_length ( ) const
virtual

Return the space needed for serialization.

Implements SnmpSyntax.

const char* SnmpInt32::get_printable ( ) const
virtual

Get a printable ASCII value.

Implements SnmpSyntax.

virtual SmiUINT32 SnmpInt32::get_syntax ( ) const
inlinevirtual

Return the syntax.

Returns
This method always returns sNMP_SYNTAX_INT32.

Implements SnmpSyntax.

Definition at line 253 of file integer.h.

References sNMP_SYNTAX_INT32.

SnmpInt32::operator long ( ) const
inline

Behave like an long.

Returns
value as long

Definition at line 296 of file integer.h.

SnmpInt32& SnmpInt32::operator= ( const long  i)
inline

Overloaded assignment for longs.

Parameters
i- new value
Returns
self reference

Definition at line 261 of file integer.h.

SnmpInt32& SnmpInt32::operator= ( const SnmpInt32 li)
inline

Overloaded assignment for SnmpInt32.

Parameters
li- new value
Returns
self reference

Definition at line 275 of file integer.h.

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

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

Map other SnmpSyntax objects to SnmpInt32.

Implements SnmpSyntax.

bool SnmpInt32::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 315 of file integer.h.

Member Data Documentation

SNMP_PP_MUTABLE bool SnmpInt32::m_changed
protected

Definition at line 331 of file integer.h.

SNMP_PP_MUTABLE char SnmpInt32::output_buffer[INTOUTBUF]
protected

Definition at line 330 of file integer.h.

bool SnmpInt32::valid_flag
protected

Definition at line 329 of file integer.h.

Referenced by operator=().


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