![]() |
Plasma Engine
2.0
|
Serialization Context that de-duplicates objects when writing to a stream. Duplicated objects are identified by their address and only the first occurrence is written to the stream while all subsequence occurrences are just written as an index. More...
#include <DeduplicationWriteContext.h>
Public Types | |
enum class | WriteMapMode { DedupKey , DedupValue , DedupBoth } |
Public Member Functions | |
template<typename T > | |
plResult | WriteObject (plStreamWriter &inout_stream, const T &obj) |
Writes a single object to the stream. Can be either a reference or a pointer to the object. | |
template<typename T > | |
plResult | WriteObject (plStreamWriter &inout_stream, const plSharedPtr< T > &pObject) |
Writes a single object to the stream. | |
template<typename T > | |
plResult | WriteObject (plStreamWriter &inout_stream, const plUniquePtr< T > &pObject) |
Writes a single object to the stream. | |
template<typename ArrayType , typename ValueType > | |
plResult | WriteArray (plStreamWriter &inout_stream, const plArrayBase< ValueType, ArrayType > &array) |
Writes an array of de-duplicated objects. | |
template<typename KeyType , typename Comparer > | |
plResult | WriteSet (plStreamWriter &inout_stream, const plSetBase< KeyType, Comparer > &set) |
Writes a set of de-duplicated objects. | |
template<typename KeyType , typename ValueType , typename Comparer > | |
plResult | WriteMap (plStreamWriter &inout_stream, const plMapBase< KeyType, ValueType, Comparer > &map, WriteMapMode mode) |
Writes a map. Mode controls whether key or value or both should de-duplicated. | |
template<typename T > | |
PL_ALWAYS_INLINE plResult | WriteObject (plStreamWriter &inout_stream, const T &obj) |
template<typename T > | |
PL_ALWAYS_INLINE plResult | WriteObject (plStreamWriter &inout_stream, const plSharedPtr< T > &pObject) |
template<typename T > | |
PL_ALWAYS_INLINE plResult | WriteObject (plStreamWriter &inout_stream, const plUniquePtr< T > &pObject) |
![]() | |
void | SetActive (bool bActive) |
Set the context as active which means it can be accessed via GetContext in serialization methods. | |
Serialization Context that de-duplicates objects when writing to a stream. Duplicated objects are identified by their address and only the first occurrence is written to the stream while all subsequence occurrences are just written as an index.