#include <snmp_pp_ext.h>
Public Member Functions | |
| Oidx () | |
| Construct an empty Object Identifier. | |
| Oidx (const char *s) | |
| Construct an Object Identifier from a string. | |
| Oidx (const unsigned long *data, int length) | |
| Construct an Object Identifier from a long array. | |
| Oidx (const Oid &oid) | |
| Copy constructor. | |
| virtual | ~Oidx () |
| Destructor. | |
| Oidx | cut_left (const unsigned int) const |
| Return a copy of the receiver oid without the n leftmost subidentifiers. | |
| Oidx | cut_right (const unsigned int) const |
| Return a copy of the receiver oid without the n rightmost subidentifiers. | |
| Oidx & | mask (const NS_SNMP OctetStr &) |
| Mask the receiver, i.e. | |
| unsigned long | last () const |
| Return the last subidentifier of the receiver. | |
| virtual Oidx & | operator= (unsigned long l) |
| Oidx & | operator+= (NS_SNMP IpAddress &) |
| Oidx & | operator+= (const char *) |
| Oidx & | operator+= (const unsigned long i) |
| Oidx & | operator+= (const Oid &) |
| int | in_subtree_of (const Oidx &o) const |
| Check if the receiver is in the subtree of a given oid. | |
| int | is_root_of (const Oidx &o) const |
| Check if the receiver is root of a given oid. | |
| int | compare (const Oidx &, const NS_SNMP OctetStr &) const |
| Compare the receiver with another object identifier using a mask which defines to subidentifiers to be compared. | |
| int | compare (const Oidx &, u_int) const |
| Compare the receiver with another object identifier using a wildcard at the given subidentifier. | |
| NS_SNMP OctetStr | as_string () const |
| Return the receiver as an OctetStr. | |
| Oidx | successor () const |
| Return the immediate lexicographic successor of the receiver. | |
| Oidx | predecessor () const |
| Return the immediate lexicographic predecessor of the receiver. | |
| Oidx | next_peer () const |
| Return the next peer of the receiver. | |
Static Public Member Functions | |
| static Oidx | cut_left (const Oidx &, const unsigned int) |
| Return a copy of the given oid without the n leftmost subidentifiers. | |
| static Oidx | cut_right (const Oidx &, const unsigned int) |
| Return a copy of the given oid without the n rightmost subidentifiers. | |
| static Oidx | from_string (const NS_SNMP OctetStr &, boolean withLength=TRUE) |
| Return an object identifier from a string. | |
AGENT++ uses Oidx instead of Oid.
| Oidx::Oidx | ( | ) | [inline] |
Construct an empty Object Identifier.
| Oidx::Oidx | ( | const char * | s | ) | [inline] |
Construct an Object Identifier from a string.
| s | - A oid string (e.g., ".x.y.z" or "x.y.z") |
| Oidx::Oidx | ( | const unsigned long * | data, | |
| int | length | |||
| ) | [inline] |
Construct an Object Identifier from a long array.
| data | - An array of long values. | |
| length | - The length of the array. |
| Oidx::Oidx | ( | const Oid & | oid | ) | [inline] |
Copy constructor.
| oid | - Another object identifier. |
| virtual Oidx::~Oidx | ( | ) | [inline, virtual] |
Destructor.
| Oidx Oidx::cut_left | ( | const unsigned | int | ) | const |
Return a copy of the receiver oid without the n leftmost subidentifiers.
| n | - The number of subidentifiers to cut of from left side. |
| Oidx Oidx::cut_right | ( | const unsigned | int | ) | const |
Return a copy of the receiver oid without the n rightmost subidentifiers.
| n | - The number of subidentifiers to cut of from right side. |
| Oidx& Oidx::mask | ( | const NS_SNMP OctetStr & | ) |
Mask the receiver, i.e.
zero those sub-identifiers for which a bit in the mask is set. Each bit of the bit mask corresponds to a sub-identifier, with to most significant bit of the i-th octet of the octet string value corresponding to the (8*i - 7)-th sub-identifier, and the least significant bit of the i-th octet corresponding to the (8*i)-th sub-identifier.
| mask | an octet string. |
| unsigned long Oidx::last | ( | ) | const |
Return the last subidentifier of the receiver.
| virtual Oidx& Oidx::operator= | ( | unsigned long | l | ) | [virtual] |
| Oidx& Oidx::operator+= | ( | NS_SNMP IpAddress & | ) |
| Oidx& Oidx::operator+= | ( | const char * | ) |
| Oidx& Oidx::operator+= | ( | const unsigned long | i | ) |
| Oidx& Oidx::operator+= | ( | const Oid & | ) |
| int Oidx::in_subtree_of | ( | const Oidx & | o | ) | const |
Check if the receiver is in the subtree of a given oid.
| o | - An Oidx object identifier. |
| int Oidx::is_root_of | ( | const Oidx & | o | ) | const |
Check if the receiver is root of a given oid.
| o | - An Oidx object identifier. |
| int Oidx::compare | ( | const Oidx & | , | |
| const NS_SNMP OctetStr & | ||||
| ) | const |
Compare the receiver with another object identifier using a mask which defines to subidentifiers to be compared.
The mask is used like defined in RFC2273 for the snmpNotifyFilterMask.
| other | another object identifier to compare the receiver with. | |
| mask | an octet string containing a mask. |
| int Oidx::compare | ( | const Oidx & | , | |
| u_int | ||||
| ) | const |
Compare the receiver with another object identifier using a wildcard at the given subidentifier.
| other | another object identifier to compare the receiver with. | |
| wildcard_subid | the subidentifier position (>=0) that is not compared |
| NS_SNMP OctetStr Oidx::as_string | ( | ) | const |
Return the receiver as an OctetStr.
Every subidentifier is interpreted as one char. Thus, all subidentifiers must be between 0 and 255.
| static Oidx Oidx::from_string | ( | const NS_SNMP OctetStr & | , | |
| boolean | withLength = TRUE | |||
| ) | [static] |
Return an object identifier from a string.
The first subidentifier will contain the length of the string, each following subidentifier represents one character.
| withExplicitLength | if FALSE there will be no preceeding subid containing the length of the string will be generated. |
| Oidx Oidx::successor | ( | ) | const |
| Oidx Oidx::predecessor | ( | ) | const |
Return the immediate lexicographic predecessor of the receiver.
| Oidx Oidx::next_peer | ( | ) | const |
Return the next peer of the receiver.
Thus, add one to the last sub-identifier. Note: If the receiver's last sub-identifier is 0xFFFFFFFFul the returned object ID may not be valid.
1.5.6