#include <mcllib/snmp/MCPdu.h>
Inheritance diagram for MCPdu:

Public Types | |
| typedef IMPLTYPE | const_iterator |
| Const iterators only - can't change it once created. | |
| typedef const MCVB * | IMPLTYPE |
| Element type. | |
| typedef unsigned long | size_t |
| Size type. | |
Public Member Functions | |
| void | append (const MCPdu &mcp) |
| Append a pdu to end of this pdu. | |
| const MCVB & | back () const |
| Get the vb at the end of the pdu. | |
| const_iterator | begin () const |
| Iterator to beginning of vb array. | |
| void | clear () |
| clear the contents of the pdu | |
| MCPdu | clone () const |
| clone the pdu - get a thread safe copy | |
| const_iterator | end () const |
| Iterator to end of vb array. | |
| unsigned long | getCount () const |
| debug for getting ref count | |
| size_t | getValid () const |
| Get the number of valid VBs in the PDU. | |
| size_t | length () const |
| Get the length (total number of VBs in the PDU). | |
| MCPdu (IMPLTYPE pStr, size_t length) | |
| PDU from a vb pointer (array of vbs) and a length. | |
| MCPdu () | |
| Empty pdu. | |
| operator IMPLTYPE () | |
| Get the vb array. | |
| const MCVB & | operator[] (size_t index) const |
| Get a specific element out of the pdu - note const only. | |
| void | push_back (const MCVB &vb) |
| Add a vb to end of pdu. | |
| void | reserve (size_t extent) |
| reserve extent elements for vbs. | |
| ~MCPdu () | |
| Destroy pdu. | |
A PDU is a list of variable bindings (VB's). Note copying the PDU is in-expensive (it uses reference counting). However, if you want a thread-safe copy of a pdu, use the clone method instead. Internal logic within the snmp library clone()s a pdu before modifying it. Note that push_back() grows the pdu as necessary, but it is more efficient to reserve() the amount of space required for VB's before-hand if you know how much is needed. For complete safety only push_back() onto a pdu that you have clone()d.
|
|
reserve extent elements for vbs. Do nothing if already bigger |
1.3.9.1