Skip to content

BinarySerializer

template <class T> class BinarySerializer

Functions

Name Description
save Save an object to a binary archive object : to save archive : to save to - some implementations clear() it before appending (e.g. in HashBinarySerializer), some do not (e.g. in SchemaBinarySerializer) Save an object by appending it to a binary archive object : to save archive : to append to - no clear() called Save an object to the BufferSet object : archive :
load Load an object from a binary archive.
load Load an object from BufferSet archive object : archive : BufferSet object
loadLastFromSequence @brief Loads the last object from a sequence of concatenated binary serialized objects of the same type.
save Save an object to a binary archive object : to save archive : to save to
load Load an object from a binary archive.
load Load an object from a binary archive.
save Return the serialized binary representation of an object, i.e. save into an empty archive and return this object : Return :
load Load an object from a binary archive.
load Load an object from a binary archive.
save Save a vector of objects into a binary archive objects : archive :
load Load a vector of objects from a binary archive.
load Load a vector of objects from a binary archive.

Function Details

load

size_t load(T& object, const std::vector<char>& archive)

Load an object from a binary archive.

object : to load data into

archive : binary archive containing the data

nBytes : size in bytes of the data archive

Return : number of processed bytes in archive Load an object from a binary archive.

object : to load data into

archive : binary archive containing the data

Return : number of processed bytes in archive

virtual void load(T& object, const karabo::data::BufferSet& archive)

Load an object from BufferSet archive

object :

archive : BufferSet object

size_t load(const std::shared_ptr<T>& object, const char* archive, const size_t nBytes)

Load an object from a binary archive.

object : to load data into

archive : binary archive containing the data

nBytes : size in bytes of the data archive

Return : number of processed bytes in archive

size_t load(const std::shared_ptr<T>& object, const std::vector<char>& archive)

Load an object from a binary archive.

object : to load data into

archive : binary archive containing the data

Return : number of processed bytes in archive

T load(const char* archive, const size_t nBytes)

Load an object from a binary archive.

archive : binary archive containing the data

nBytes : size in bytes of the data archive

T load(const std::vector<char>& archive)

Load an object from a binary archive.

archive : binary archive containing the data

virtual size_t load(std::vector<T>& objects, const char* archive, const size_t nBytes)

Load a vector of objects from a binary archive.

objects : to load data into

archive : binary archive containing the data

nBytes : size in bytes of the data archive

Return : number of processed bytes in archive

size_t load(std::vector<T>& objects, const std::vector<char>& archive)

Load a vector of objects from a binary archive.

objects : to load data into

archive : binary archive containing the data

loadLastFromSequence

void loadLastFromSequence(T& object, const char* archive, const std::size_t nBytes)

@brief Loads the last object from a sequence of concatenated binary serialized objects of the same type. Sequences with only one object are also supported.

object : to load the last instance into.

archive : sequence containing 1 or more objects of type T in binary serialized form.

save

virtual void save(const T& object, karabo::data::BufferSet& archive)

Save an object to a binary archive

object : to save

archive : to save to - some implementations clear() it before appending (e.g. in HashBinarySerializer), some do not (e.g. in SchemaBinarySerializer) Save an object by appending it to a binary archive

object : to save

archive : to append to - no clear() called Save an object to the BufferSet

object :

archive :

void save(const std::shared_ptr<T>& object, std::vector<char>& archive)

Save an object to a binary archive

object : to save

archive : to save to

std::vector<char> save(const T& object)

Return the serialized binary representation of an object, i.e. save into an empty archive and return this

object :

Return :

virtual void save(const std::vector<T>& objects, std::vector<char>& archive)

Save a vector of objects into a binary archive

objects :

archive :