56 #ifndef _SNMP_INTEGER_H_ 57 #define _SNMP_INTEGER_H_ 62 #ifdef SNMP_PP_NAMESPACE 66 #define INTOUTBUF 15 // largest ASCII formatted integer 88 :
SnmpSyntax(), valid_flag(true), m_changed(true)
90 smival.value.uNumber = i;
100 :
SnmpSyntax(), valid_flag(c.valid_flag), m_changed(true)
126 smival.value.uNumber = i;
159 operator unsigned long()
const {
return smival.value.uNumber; };
164 virtual const char *get_printable()
const;
179 bool valid()
const {
return valid_flag; }
184 int get_asn1_length()
const;
190 { smival.value.uNumber = 0; valid_flag =
true; m_changed =
true; }
212 :
SnmpSyntax(), valid_flag(true), m_changed(true)
214 smival.value.sNumber = i;
224 :
SnmpSyntax(), valid_flag(c.valid_flag), m_changed(true)
250 smival.value.sNumber = i;
283 operator long ()
const {
return (
long) smival.value.sNumber; }
288 const char *get_printable()
const;
302 bool valid()
const {
return valid_flag; }
307 int get_asn1_length()
const;
313 { smival.value.sNumber = 0; valid_flag =
true; m_changed =
true; }
321 #ifdef SNMP_PP_NAMESPACE 325 #endif // _SNMP_INTEGER_H_ #define sNMP_SYNTAX_UINT32
virtual SmiUINT32 get_syntax() const
Return the syntax.
SNMP_PP_MUTABLE bool m_changed
SnmpSyntax * clone() const
Clone operator.
void clear()
Reset the object.
virtual ~SnmpInt32()
Destructor (ensure that SnmpSyntax::~SnmpSyntax() is overridden).
32 bit signed integer class.
SnmpUInt32(const SnmpUInt32 &c)
Copy constructor.
bool valid() const
Return validity of the object.
virtual ~SnmpUInt32()
Destructor (ensure that SnmpSyntax::~SnmpSyntax() is overridden).
SnmpInt32(const long i=0)
Constructor with value.
SnmpInt32(const SnmpInt32 &c)
Copy constructor.
32 bit unsigned integer class.
#define sNMP_SYNTAX_INT32
SNMP_PP_MUTABLE bool m_changed
void clear()
Reset the object.
SnmpUInt32(const unsigned long i=0)
Constructor with value (defaults to 0).
An "abstract" (pure virtual) class that serves as the base class for all specific SNMP syntax types...
virtual SnmpSyntax * clone() const
Clone operator.
bool valid() const
Return validity of the object.
virtual SmiUINT32 get_syntax() const
Return the syntax.