Plasma Engine  2.0
Loading...
Searching...
No Matches
plDeduplicationReadContext Class Reference

Serialization Context that reads de-duplicated objects from a stream and restores the pointers. More...

#include <DeduplicationReadContext.h>

Inheritance diagram for plDeduplicationReadContext:

Public Types

enum class  ReadMapMode { DedupKey , DedupValue , DedupBoth }
 

Public Member Functions

template<typename T >
plResult ReadObjectInplace (plStreamReader &inout_stream, T &ref_obj)
 Reads a single object inplace.
 
template<typename T >
plResult ReadObject (plStreamReader &inout_stream, T *&ref_pObject, plAllocator *pAllocator=plFoundation::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 >
plResult ReadObject (plStreamReader &inout_stream, plSharedPtr< T > &ref_pObject, plAllocator *pAllocator=plFoundation::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 >
plResult ReadObject (plStreamReader &inout_stream, plUniquePtr< T > &ref_pObject, plAllocator *pAllocator=plFoundation::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 >
plResult ReadArray (plStreamReader &inout_stream, plArrayBase< ValueType, ArrayType > &ref_array, plAllocator *pAllocator=plFoundation::GetDefaultAllocator())
 Reads an array of de-duplicated objects.
 
template<typename KeyType , typename Comparer >
plResult ReadSet (plStreamReader &inout_stream, plSetBase< KeyType, Comparer > &ref_set, plAllocator *pAllocator=plFoundation::GetDefaultAllocator())
 Reads a set of de-duplicated objects.
 
template<typename KeyType , typename ValueType , typename Comparer >
plResult ReadMap (plStreamReader &inout_stream, plMapBase< KeyType, ValueType, Comparer > &ref_map, ReadMapMode mode, plAllocator *pKeyAllocator=plFoundation::GetDefaultAllocator(), plAllocator *pValueAllocator=plFoundation::GetDefaultAllocator())
 Reads a map. Mode controls whether key or value or both should de-duplicated.
 
template<typename T >
PL_ALWAYS_INLINE plResult ReadObjectInplace (plStreamReader &inout_stream, T &inout_obj)
 
- Public Member Functions inherited from plSerializationContext< plDeduplicationReadContext >
void SetActive (bool bActive)
 Set the context as active which means it can be accessed via GetContext in serialization methods.
 

Detailed Description

Serialization Context that reads de-duplicated objects from a stream and restores the pointers.


The documentation for this class was generated from the following files: