#include <oid.h>
Inheritance diagram for Oid:
The Object Identification (Oid) class is the encapsulation of an SMI object identifier. The SMI object is a data identifier for a data element found in a Management Information Base (MIB), as defined by a MIB definition. The SMI Oid, its related structures and functions, are a natural fit for object orientation. In fact, the Oid class shares many common features to the C++ String class. For those of you familiar with the C++ String class or Microsoft's Foundation Classes (MFC) CString class, the Oid class will be familiar and easy to use. The Oid class is designed to be efficient and fast. The Oid class allows definition and manipulation of object identifiers.
Definition at line 96 of file oid.h.
Public Member Functions | |
| Oid () | |
| Construct an invalid Oid. | |
| Oid (const char *dotted_oid_string) | |
| Construct an Oid from a dotted string. | |
| Oid (const Oid &oid) | |
| Constructor using another oid object (copy constructor). | |
| Oid (const unsigned long *raw_oid, int oid_len) | |
| Constructor from array. | |
| virtual | ~Oid () |
| Destructor. | |
| SmiUINT32 | get_syntax () const |
| Return the current syntax. | |
| virtual Oid & | operator= (const char *dotted_oid_string) |
| Assignment from a string. | |
| virtual Oid & | operator= (const Oid &oid) |
| Assign one Oid to another. | |
| int | get_asn1_length () const |
| Return the space needed for serialization. | |
| Oid & | operator+= (const char *a) |
| Append operator, appends the dotted oid string. | |
| Oid & | operator+= (const unsigned long i) |
| Appends an int. | |
| Oid & | operator+= (const Oid &o) |
| Appends an Oid. | |
| unsigned long & | operator[] (int position) |
| Allows element access as an array. | |
| unsigned long | operator[] (int position) const |
| Allows element access as an array for const objects. | |
| SmiLPOID | oidval () |
| Get the WinSnmp oid part. | |
| void | set_data (const unsigned long *raw_oid, const unsigned int oid_len) |
| Set the data from raw form. | |
| unsigned long | len () const |
| Get the length of the oid. | |
| void | trim (const unsigned long n=1) |
| Trim off the rightmost values of an oid. | |
| int | nCompare (const unsigned long n, const Oid &o) const |
| Compare two Oids from the left in direction left-to-right. | |
| int | RnCompare (const unsigned long n, const Oid &o) const |
| Compare two Oids from the right in direction right-to left. | |
| bool | valid () const |
| Return validity of the object. | |
| const char * | get_printable () const |
| Get a printable ASCII string of the whole value. | |
| const char * | get_printable (const unsigned long n) const |
| Get a printable ASCII string of the right part of the value. | |
| const char * | get_printable (const unsigned long start, const unsigned long n) const |
| Get a printable ASCII string of a part of the value. | |
| SnmpSyntax * | clone () const |
| Clone this object. | |
| SnmpSyntax & | operator= (const SnmpSyntax &val) |
| Map other SnmpSyntax objects to Oid. | |
| void | clear () |
| Clear the Oid. | |
Protected Member Functions | |
| virtual int | StrToOid (const char *string, SmiLPOID dstOid) |
| Convert a string to an smi oid. | |
| virtual int | OidCopy (SmiLPOID srcOid, SmiLPOID dstOid) |
| Clone an smi oid. | |
| virtual int | OidToStr (const SmiOID *srcOid, SmiUINT32 size, char *string) const |
| Convert an smi oid to its string representation. | |
| void | delete_oid_ptr () |
| Free the internal oid pointer and set the pointer and the length to zero. | |
Protected Attributes | |
| char * | iv_str |
Friends | |
| DLLOPT friend int | operator== (const Oid &lhs, const Oid &rhs) |
| Overloaded equal operator. | |
| DLLOPT friend int | operator!= (const Oid &lhs, const Oid &rhs) |
| Overloaded not equal operator. | |
| DLLOPT friend int | operator< (const Oid &lhs, const Oid &rhs) |
| Overloaded less than < operator. | |
| DLLOPT friend int | operator<= (const Oid &lhs, const Oid &rhs) |
| Overloaded less than <= operator. | |
| DLLOPT friend int | operator> (const Oid &lhs, const Oid &rhs) |
| Overloaded greater than > operator. | |
| DLLOPT friend int | operator>= (const Oid &lhs, const Oid &rhs) |
| Overloaded greater than >= operator. | |
| DLLOPT friend int | operator== (const Oid &lhs, const char *rhs) |
| Overloaded equal operator operator. | |
| DLLOPT friend int | operator!= (const Oid &lhs, const char *rhs) |
| Overloaded not equal operator. | |
| DLLOPT friend int | operator< (const Oid &lhs, const char *rhs) |
| Overloaded less than < operator. | |
| DLLOPT friend int | operator<= (const Oid &lhs, char *rhs) |
| Overloaded less than <= operator. | |
| DLLOPT friend int | operator> (const Oid &lhs, const char *rhs) |
| Overloaded greater than > operator. | |
| DLLOPT friend int | operator>= (const Oid &lhs, const char *rhs) |
| Overloaded greater than >= operator. | |
| DLLOPT friend Oid | operator+ (const Oid &lhs, const Oid &rhs) |
| Overloaded operator +, Concatenate two Oids. | |
|
|
Construct an invalid Oid.
|
|
|
Construct an Oid from a dotted string.
|
|
|
Constructor using another oid object (copy constructor).
|
|
||||||||||||
|
Constructor from array.
|
|
|
Destructor.
|
|
|
Clear the Oid.
Implements SnmpSyntax. |
|
|
Clone this object.
Implements SnmpSyntax. |
|
|
Free the internal oid pointer and set the pointer and the length to zero.
Definition at line 411 of file oid.h. References SnmpSyntax::smival, and SmiVALUE::value. |
|
|
Return the space needed for serialization.
Implements SnmpSyntax. |
|
||||||||||||
|
Get a printable ASCII string of a part of the value.
|
|
|
Get a printable ASCII string of the right part of the value.
|
|
|
Get a printable ASCII string of the whole value.
Implements SnmpSyntax. |
|
|
Return the current syntax.
Implements SnmpSyntax. Definition at line 137 of file oid.h. References SmiUINT32, and sNMP_SYNTAX_OID. |
|
|
Get the length of the oid.
Definition at line 288 of file oid.h. Referenced by Pdu::get_notify_enterprise(), and Pdu::get_notify_id(). |
|
||||||||||||
|
Compare two Oids from the left in direction left-to-right.
|
|
||||||||||||
|
Clone an smi oid.
|
|
||||||||||||||||
|
Convert an smi oid to its string representation.
|
|
|
Get the WinSnmp oid part.
Definition at line 274 of file oid.h. References SmiLPOID. |
|
|
Appends an Oid.
|
|
|
Appends an int.
|
|
|
Append operator, appends the dotted oid string.
|
|
|
Map other SnmpSyntax objects to Oid.
Reimplemented from SnmpSyntax. |
|
|
Assign one Oid to another.
|
|
|
Assignment from a string.
|
|
|
Allows element access as an array for const objects. This method behaves like real array: if your position is out of bounds, you're lost!
|
|
|
Allows element access as an array. This method behaves like real array: if your position is out of bounds, you're lost!
|
|
||||||||||||
|
Compare two Oids from the right in direction right-to left.
|
|
||||||||||||
|
Set the data from raw form.
|
|
||||||||||||
|
Convert a string to an smi oid.
|
|
|
Trim off the rightmost values of an oid.
|
|
|
Return validity of the object.
Implements SnmpSyntax. |
|
||||||||||||
|
Overloaded not equal operator.
|
|
||||||||||||
|
Overloaded not equal operator.
|
|
||||||||||||
|
Overloaded operator +, Concatenate two Oids.
|
|
||||||||||||
|
Overloaded less than < operator.
|
|
||||||||||||
|
Overloaded less than < operator.
|
|
||||||||||||
|
Overloaded less than <= operator.
|
|
||||||||||||
|
Overloaded less than <= operator.
|
|
||||||||||||
|
Overloaded equal operator operator.
|
|
||||||||||||
|
Overloaded equal operator.
|
|
||||||||||||
|
Overloaded greater than > operator.
|
|
||||||||||||
|
Overloaded greater than > operator.
|
|
||||||||||||
|
Overloaded greater than >= operator.
|
|
||||||||||||
|
Overloaded greater than >= operator.
|
|
|
|
1.3.2