#include <mcllib/snmp/MCOid.h>
Inheritance diagram for MCOid:
Public Types | |
typedef IMPLTYPE | const_iterator |
const iterator type. | |
typedef const mcuint32 * | IMPLTYPE |
Individual oid component type. | |
typedef unsigned long | size_t |
Size type. | |
Public Member Functions | |
const_iterator | begin () const |
Iterator to beginning of oid component array. | |
void | clear () |
clear the contents of the oid | |
int | cmp (const MCOid &mco) const |
oid comparison. | |
const_iterator | end () const |
Iterator to end of oid component array. | |
unsigned long | getCount () const |
debug for getting ref count | |
bool | isPrefixOf (const MCOid &mco) const |
return true if this oid is a prefix of mco | |
size_t | length () const |
Get the number of oid components in the array. | |
MCOid (IMPLTYPE pOid, size_t length) | |
Construct an oid from a oid component pointer and a length. | |
MCOid (const char *oidStr) | |
Construct from a string representation of an oid. | |
MCOid () | |
Construct an empty oid. | |
operator IMPLTYPE () const | |
Return a pointer to the beginning of the oid component array. | |
bool | operator!= (const MCOid &mco) const |
Test two oids for inequality. | |
bool | operator< (const MCOid &mco) const |
Test two oids for less-than. | |
bool | operator== (const MCOid &mco) const |
Test two oids for equality. | |
MCOid | suboid (int start, int length=0) const |
get a suboid from the oid | |
MCString | toString () const |
Get a string representation of the oid array. | |
~MCOid () | |
Destroy the oid. |
An oid is an array (or list) of oid components. Each oid component is an integer value (32-bit unsigned integer in this implementation). When expression the oid array as a string, the integer values are separated by the dot (.) character. Example ".1.3.6.1.2.1"
|
const iterator type. Note that only constant iterators are provided because the oid data must not be changed via the iterator. |
|
Construct an empty oid. No (extra) memory is allocated. |
|
Destroy the oid. Free any allocated memory |
|
Construct from a string representation of an oid. oidStr is either NULL (in which case an empty oid is constructed. See MCOid()) or a list of integers separated by dots. Example ".1.3.6.1.2.1" |
|
Construct an oid from a oid component pointer and a length. pOid points to a oid component array of at least length components. If pOid is NULL or length is zereo an empty oid is constructed (see MCOid()). |
|
oid comparison. Returns zero if this == mco. Returns a negative number if this < mco. Returns a positive number if this > mco. |
|
Return a pointer to the beginning of the oid component array. If the oid is empty a NULL pointer is returned. Contrast this with MCString cast to const char* which always returns a valid pointer. |
|
Test two oids for inequality. Returns true if this != mco. |
|
Test two oids for less-than. Useful for sorting and to allow oids to be used in STL containers. Returns true if this < mco (numerically by component). |
|
Test two oids for equality. Returns true if this == mco. |