SNMP++  3.3.4
TimeTicks Class Reference

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

#include <timetick.h>

Inheritance diagram for TimeTicks:
Collaboration diagram for TimeTicks:

Public Member Functions

 TimeTicks (const unsigned long val=0)
 Constructs a TimeTicks object with the given value. More...
 
 TimeTicks (const TimeTicks &t)
 Copy constructor. More...
 
 ~TimeTicks ()
 Destructor. More...
 
SmiUINT32 get_syntax () const
 Return the syntax. More...
 
const char * get_printable () const
 Get a printable ASCII value. More...
 
SnmpSyntaxclone () const
 Clone operator. More...
 
TimeTicksoperator= (const TimeTicks &uli)
 Overloaded assignment for TimeTicks. More...
 
TimeTicksoperator= (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...
 
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

SNMP_PP_MUTABLE char output_buffer [TICKOUTBUF]
 
- 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
 

Additional Inherited Members

- Protected Member Functions inherited from SnmpSyntax
 SnmpSyntax ()
 

Detailed Description

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

TimeTicks objects may be get or set into Vb objects.

Definition at line 73 of file timetick.h.

Constructor & Destructor Documentation

TimeTicks::TimeTicks ( const unsigned long  val = 0)
inline

Constructs a TimeTicks object with the given value.

Parameters
val- time in hundredths of seconds.

Definition at line 89 of file timetick.h.

References sNMP_SYNTAX_TIMETICKS.

TimeTicks::TimeTicks ( const TimeTicks t)
inline

Copy constructor.

Parameters
t- Time for the new object.

Definition at line 100 of file timetick.h.

References sNMP_SYNTAX_TIMETICKS.

TimeTicks::~TimeTicks ( )
inline

Destructor.

Definition at line 109 of file timetick.h.

Member Function Documentation

SnmpSyntax* TimeTicks::clone ( ) const
inlinevirtual

Clone operator.

Returns
Pointer to a newly created copy of the object.

Reimplemented from SnmpUInt32.

Definition at line 128 of file timetick.h.

const char* TimeTicks::get_printable ( ) const
virtual

Get a printable ASCII value.

Reimplemented from SnmpUInt32.

SmiUINT32 TimeTicks::get_syntax ( ) const
inlinevirtual

Return the syntax.

Returns
Always returns sNMP_SYNTAX_TIMETICKS.

Reimplemented from SnmpUInt32.

Definition at line 116 of file timetick.h.

References sNMP_SYNTAX_TIMETICKS.

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

Overloaded assignment for TimeTicks.

Parameters
uli- new value
Returns
self reference

Definition at line 141 of file timetick.h.

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

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

Overloaded assignment for unsigned longs.

Parameters
ul- new value in hundrets of seconds
Returns
self reference

Definition at line 155 of file timetick.h.

References SnmpUInt32::operator=().

Member Data Documentation

SNMP_PP_MUTABLE char TimeTicks::output_buffer[TICKOUTBUF]
protected

Definition at line 177 of file timetick.h.


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