Class Blob

Class Documentation

class Blob

A blob is a pointer to data, potentially stored in an Archive.

All Blob’s methods are threadsafe.

Public Types

using DataPtr = std::shared_ptr<const char>

Public Functions

Blob()

Constuct a empty Blob

Blob(const char *data, size_type size)

Constuct Blob pointing to data.

The created blob only point to the data and doesn’t own it. User must care that data is not freed before using the blob.

Blob(const DataPtr &buffer, size_type size)

Constuct Blob pointing to data.

The created blob shares the ownership on data.

inline operator std::string() const
inline const char *data() const
inline const char *end() const
inline size_type size() const