#include <bytearray.h>
Inheritance diagram for openikev2::ByteArray:

Public Member Functions | |
| ByteArray (uint32_t capacity) | |
| Creates a new ByteArray with the indicated capacity. | |
| ByteArray (uint32_t capacity, uint8_t pattern) | |
| Creates a new ByteArray with the indicated capacity. | |
| ByteArray (const void *array, uint32_t size, uint32_t capacity, bool owns_memory=false) | |
| Creates a new ByteArray using an existing raw byte array. | |
| ByteArray (const void *array, uint32_t size, bool owns_memory=false) | |
| Creates a new ByteArray using an existing raw byte array. | |
| ByteArray (const ByteArray &other) | |
| Creates a new ByteArray cloning another one. | |
| virtual uint8_t * | getRawPointer () const |
| Gets the raw pointer to the array. | |
| virtual bool | operator== (const ByteArray &other) const |
| Compares if this ByteArray object is equal to other. | |
| virtual bool | operator< (const ByteArray &other) const |
| Compares if this ByteArray object is lesser than other (lexicographically). | |
| virtual bool | operator> (const ByteArray &other) const |
| Compares if this ByteArray object is greater than other (lexicographically). | |
| virtual uint8_t & | operator[] (const uint32_t position) const |
| Gets the i-nth element in the array. | |
| virtual auto_ptr< ByteArray > | clone () const |
| Gets a clone of this object. | |
| virtual uint32_t | size () const |
| Returns the size of the valid data. | |
| virtual void | setSize (uint32_t size) |
| Sets the size of the array. | |
| virtual string | toStringTab (uint8_t tabs) const |
| Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE. | |
Protected Member Functions | |
| virtual uint32_t | capacity () const |
| Returns the internal array capacity. | |
Protected Attributes | |
| uint8_t * | begin_array |
| Internal pointer to the begin of the array. | |
| uint8_t * | end_data |
| Internal pointer to the end of valid data. | |
| uint8_t * | end_array |
| Internal pointer to the end of the array. | |
Friends | |
| class | ByteBuffer |
It takes care with memory
| openikev2::ByteArray::ByteArray | ( | uint32_t | capacity | ) |
| openikev2::ByteArray::ByteArray | ( | uint32_t | capacity, | |
| uint8_t | pattern | |||
| ) |
Creates a new ByteArray with the indicated capacity.
| capacity | Capacity of the array. | |
| pattern | Patter to fill the array |
| openikev2::ByteArray::ByteArray | ( | const void * | array, | |
| uint32_t | size, | |||
| uint32_t | capacity, | |||
| bool | owns_memory = false | |||
| ) |
| openikev2::ByteArray::ByteArray | ( | const void * | array, | |
| uint32_t | size, | |||
| bool | owns_memory = false | |||
| ) |
| openikev2::ByteArray::ByteArray | ( | const ByteArray & | other | ) |
| uint32_t openikev2::ByteArray::capacity | ( | ) | const [protected, virtual] |
Returns the internal array capacity.
Reimplemented in openikev2::ByteBuffer.
| uint8_t * openikev2::ByteArray::getRawPointer | ( | ) | const [virtual] |
Gets the raw pointer to the array.
| bool openikev2::ByteArray::operator== | ( | const ByteArray & | other | ) | const [virtual] |
| bool openikev2::ByteArray::operator< | ( | const ByteArray & | other | ) | const [virtual] |
| bool openikev2::ByteArray::operator> | ( | const ByteArray & | other | ) | const [virtual] |
| uint8_t & openikev2::ByteArray::operator[] | ( | const uint32_t | position | ) | const [virtual] |
Gets the i-nth element in the array.
| position | Array position |
| auto_ptr< ByteArray > openikev2::ByteArray::clone | ( | ) | const [virtual] |
| uint32_t openikev2::ByteArray::size | ( | ) | const [virtual] |
Returns the size of the valid data.
| void openikev2::ByteArray::setSize | ( | uint32_t | size | ) | [virtual] |
Sets the size of the array.
| size | The new size |
| string openikev2::ByteArray::toStringTab | ( | uint8_t | tabs | ) | const [virtual] |
Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.
| tabs | Num of tabs preceding the textual representation. |
Implements openikev2::Printable.
1.5.1