Represents a byte array and provide convenient methods for accessing the data. The Byte array is always \0 terminated.
More...
|
| | ByteArray () |
| | Default Constructor.
|
| |
| | ByteArray (const int8 *buffer, size_t size=npos) |
| | Create a byte array. If size is < 0, a 0 terminated string is assumed. We make a copy of buffer. If buffer is NULL a NULL array is created.
|
| |
| | ByteArray (const uint8 *buffer, size_t size=npos) |
| |
| | ByteArray (size_t size, uint8 ch) |
| | Creates a byte array of size and fills every byte with ch.
|
| |
| | ByteArray (const ByteArray &other) |
| |
| | ByteArray (std::initializer_list< uint8 > list) |
| |
| | ~ByteArray () override |
| |
| int8 * | data () |
| | Returns the pointer to the data. With the pointer it is possible to modify the data. The data is always \0-terminated. The number of bytes can be assumed as Size()+1, including the \0-terminator.
|
| |
| const char * | constData () const |
| | Returns a const pointer to the data.
|
| |
| size_t | size () const |
| | Returns the size of the array.
|
| |
| bool | isNull () const |
| | Returns true, if the array is NULL.
|
| |
| bool | isEmpty () const |
| | Returns true, if the size of the array is 0.
|
| |
| void | sort () |
| | Sort the bytes in the array in ascending order.
|
| |
| void | fill (uint8 ch) |
| | Set every byte in the array to ch.
|
| |
| void | resize (size_t newSize) |
| | Resize the byte array. If the new size is bigger, it will increase the array. If the size is smaller, the bytes beyond the new size are excluded, but the array will have the same size.
|
| |
| void | reserve (size_t size) |
| | Reserve space for a given number of bytes. The size of the array is not changed.
|
| |
| uint8 | get (size_t index) const |
| |
| void | set (size_t index, uint8 item) |
| |
| void | replace (size_t tgtOffset, size_t srcOffset, const ByteArray &buffer, size_t length) |
| | Replaces the content of this array with the content of the other array.
|
| |
| void | replace (uint8 oldValue, uint8 newValue) |
| | Replaces every byte of oldValue by the newValue.
|
| |
| uint8 | operator[] (size_t index) const |
| |
| uint8 & | operator[] (size_t index) |
| |
| ByteArray & | operator= (const ByteArray &another) |
| |
| | Object () noexcept |
| | Constructor.
|
| |
| virtual | ~Object () noexcept |
| | Destructor.
|
| |
| void | release () noexcept |
| | Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
|
| |
| Object * | retain () noexcept |
| | Increases the reference counter of this object by 1.
|
| |
| Object * | autorelease () noexcept |
| | Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
|
| |
| int32 | referenceCount () const noexcept |
| | Returns the value of the reference counter.
|
| |
| virtual bool | equals (const Object *other) const |
| | Comparison of objects.
|
| |
| virtual String | displayName () const |
| | Returns the display name of the object intended to present to a user.
|
| |
| virtual void | printDiffInfo (DiffOperation operation, Object *other) const |
| | Output method for outputting the diff results for the diff algorithm.
|
| |
| void | setHighBit (bool status) noexcept |
| |
| bool | highBit () const noexcept |
| |
Represents a byte array and provide convenient methods for accessing the data. The Byte array is always \0 terminated.