ocean.util.serialize.contiguous.Util

Collection of common utilities built on top of (de)serializer

Members

Functions

copy
Contiguous!(S) copy(Contiguous!(S) src, Contiguous!(S) dst)

Copies struct data to other chunk and adjusts all internal pointers to reference new buffer.

copy
Contiguous!(S) copy(S src, Contiguous!(S) dst)

Deep copies any struct to its contiguous representation. Effectively does serialization and deserialization in one go.

deepCopy
S deepCopy(S src, void[] dst)

Simple wrapper on top of (de)serializer which allows to deep copy a given struct by storing all indirections in contiguous buffer. Most commonly used in tests - performance-critical applications should store Contiguous!(S) instead and copy it as it is much faster.

deepCopy
S deepCopy(S src)

Ditto, but allocates new buffer each time called

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).