![]() |
XII Release 0.1.0
|
Serialization Context that reads de-duplicated objects from a stream and restores the pointers. More...
#include <DeduplicationReadContext.h>
Public Types | |
| enum class | ReadMapMode { DedupKey , DedupValue , DedupBoth } |
Public Member Functions | |
| template<typename T> | |
| xiiResult | ReadObjectInplace (xiiStreamReader &ref_stream, T &ref_obj) |
| Reads a single object inplace. | |
| template<typename T> | |
| xiiResult | ReadObject (xiiStreamReader &ref_stream, T *&ref_pObject, xiiAllocatorBase *pAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads a single object and sets the pointer to it. The given allocator is used to create the object if it doesn't exist yet. | |
| template<typename T> | |
| xiiResult | ReadObject (xiiStreamReader &ref_stream, xiiSharedPtr< T > &ref_pObject, xiiAllocatorBase *pAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads a single object and sets the shared pointer to it. The given allocator is used to create the object if it doesn't exist yet. | |
| template<typename T> | |
| xiiResult | ReadObject (xiiStreamReader &ref_stream, xiiUniquePtr< T > &ref_pObject, xiiAllocatorBase *pAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads a single object and sets the unique pointer to it. The given allocator is used to create the object if it doesn't exist yet. | |
| template<typename ArrayType, typename ValueType> | |
| xiiResult | ReadArray (xiiStreamReader &ref_stream, xiiArrayBase< ValueType, ArrayType > &ref_array, xiiAllocatorBase *pAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads an array of de-duplicated objects. | |
| template<typename KeyType, typename Comparer> | |
| xiiResult | ReadSet (xiiStreamReader &ref_stream, xiiSetBase< KeyType, Comparer > &ref_set, xiiAllocatorBase *pAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads a set of de-duplicated objects. | |
| template<typename KeyType, typename ValueType, typename Comparer> | |
| xiiResult | ReadMap (xiiStreamReader &ref_stream, xiiMapBase< KeyType, ValueType, Comparer > &ref_map, ReadMapMode mode, xiiAllocatorBase *pKeyAllocator=xiiFoundation::GetDefaultAllocator(), xiiAllocatorBase *pValueAllocator=xiiFoundation::GetDefaultAllocator()) |
| Reads a map. Mode controls whether key or value or both should de-duplicated. | |
| template<typename T> | |
| XII_ALWAYS_INLINE xiiResult | ReadObjectInplace (xiiStreamReader &ref_stream, T &ref_obj) |
Public Member Functions inherited from xiiSerializationContext< xiiDeduplicationReadContext > | |
| void | SetActive (bool bActive) |
| Set the context as active which means it can be accessed via GetContext in serialization methods. | |
Serialization Context that reads de-duplicated objects from a stream and restores the pointers.