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

This class allows for writing type versions to a stream in a centralized place so that each object doesn't need to write its own version manually. More...

#include <TypeVersionContext.h>

Inheritance diagram for plTypeVersionWriteContext:

Public Member Functions

plStreamWriterBegin (plStreamWriter &ref_originalStream)
 Call this method to begin collecting type version info. You need to use the returned stream writer for subsequent serialization operations until End() is called.
 
plResult End ()
 Ends the type version collection and writes the data to the original stream.
 
void AddType (const plRTTI *pRtti)
 Adds the given type and its parent types to the version table.
 
void WriteTypeVersions (plStreamWriter &inout_stream) const
 Manually write the version table to the given stream. Can be used instead of Begin()/End() if all necessary types are available in one place anyways.
 
plStreamWriterGetOriginalStream ()
 Returns the original stream that was passed to Begin().
 
- Public Member Functions inherited from plSerializationContext< plTypeVersionWriteContext >
void SetActive (bool bActive)
 Set the context as active which means it can be accessed via GetContext in serialization methods.
 

Protected Attributes

plStreamWriterm_pOriginalStream = nullptr
 
plDefaultMemoryStreamStorage m_TempStreamStorage
 
plMemoryStreamWriter m_TempStreamWriter
 
plHashSet< const plRTTI * > m_KnownTypes
 

Detailed Description

This class allows for writing type versions to a stream in a centralized place so that each object doesn't need to write its own version manually.

To use, create an object of this type on the stack, call Begin() and use the returned plStreamWriter for subsequent serialization operations. Call AddType to add a type and its parent types to the version table. Call End() once you want to finish writing the type versions.


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