Class that represents blob primitive type. More...

#include <SPL/Runtime/Type/Blob.h>

Detailed Description

Class that represents blob primitive type.

Constructor & Destructor Documentation

◆ blob() [1/4]

Default constructor

◆ blob() [2/4]

Constructor. The data is copied from the memory block passed in as a parameter, into the internal buffer hold by the blob

Parameters

◆ blob() [3/4]

Constructor. The data is copied from the list passed in as a parameter, into the internal buffer hold by the blob

Parameters

◆ blob() [4/4]

Copy constructor

Parameters

◆ ~blob()

Destructor

Member Function Documentation

◆ operator=()

Assignment operator

Parameters
Returns
self

◆ operator+=() [1/3]

Concatenation operator

Parameters
Returns
self (with appended contents)

◆ operator+=() [2/3]

Concatenation operator

Parameters
Returns
self (with appended contents)

◆ operator+=() [3/3]

Concatenation operator

Parameters
Returns
self (with appended contents)

◆ append()

Append to a blob

Parameters

◆ operator+()

Concatenation operator

Parameters
Returns
blob containing concatenation of *this and ot

◆ operator==()

Equality comparison operator

Parameters
Returns
true if equal, false otherwise

◆ operator!=()

Non-equality comparison operator

Parameters
Returns
true if not equal, false otherwise

◆ operator<()

Less than comparison operator

Parameters
Returns
true if less than, false otherwise

◆ operator>=()

Greater than or equal comparison operator

Parameters
Returns
true if greater than or equal, false otherwise

◆ operator>()

Greater than comparison operator

Parameters
Returns
true if greater than, false otherwise

◆ operator<=()

Less than or equal comparison operator

Parameters
Returns
true if less than or equal, false otherwise

◆ clear()

Clear the data

◆ operator[]() [1/2]

Element access (read-only)

Parameters
Returns
byte at index idx

◆ at() [1/2]

Element access (read-only)

Parameters
Returns
byte at index idx

◆ operator[]() [2/2]

Element access (read-write)

Parameters
Returns
byte at index idx

◆ at() [2/2]

Element access (read-write)

Parameters
Returns
byte at index idx

◆ getSize()

Get the size of the blob

Returns
size of the blob

◆ getData() [1/2]

Get a pointer to the data of the blob. The management of the returned memory block still belongs to the blob object.

Parameters
Returns
pointer to the data of the blob

◆ getData() [2/2]

Get a pointer to the data of the blob. The management of the returned memory block still belongs to the blob object.

Returns
pointer to the data of the blob

◆ setData()

Set the data of the blob. The data is copied from the memory block passed in as a parameter, into the internal buffer hold by the blob. The blob owns the copied in memory.

Parameters

◆ adoptData()

Set the data of the blob by taking over the management of the memory block passed in as a parameter. No copies are performed.

Parameters

◆ releaseData()

Get a pointer to the data of the blob, and at the same time disassociate the blob from its data. The management of the returned memory block now does not belong to this blob anymore.

Precondition
ownsData() == true;
Parameters
Returns
pointer to the data of the blob
Exceptions

◆ swap()

Swap with another blob

Parameters

◆ ownsData()

Does this blob own the data, or it is holding memory owned by someone else?

Returns
true if the blob owns the data

◆ useExternalData()

Use external data in the blob. No copies will be done. This memory will NOT be freed when the blob is destroyed. It is the responsibility of the developer to ensure that the memory remains allocated for the duration of the blob object.

Parameters

◆ serialize() [1/2]

template<class BufferType >

Serialize (binary)

Parameters

◆ deserialize() [1/2]

template<class BufferType >

Deserialize (binary)

Parameters

◆ serialize() [2/2]

Serialize (character)

Parameters

◆ deserialize() [2/2]

Deserialize (character)

Parameters

◆ hashCode()

Get hash code

Returns
hash code

◆ getSerializedSize()

Get the size in bytes when serialized

Returns
size in bytes when serialized

The documentation for this class was generated from the following file: