XII Release 0.1.0
Loading...
Searching...
No Matches
xiiTypeVersionWriteContext 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 xiiTypeVersionWriteContext:
[legend]

Public Member Functions

xiiStreamWriterBegin (xiiStreamWriter &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.
 
xiiResult End ()
 Ends the type version collection and writes the data to the original stream.
 
void AddType (const xiiRTTI *pRtti)
 Adds the given type and its parent types to the version table.
 
void WriteTypeVersions (xiiStreamWriter &ref_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.
 
xiiStreamWriterGetOriginalStream ()
 Returns the original stream that was passed to Begin().
 
- Public Member Functions inherited from xiiSerializationContext< xiiTypeVersionWriteContext >
void SetActive (bool bActive)
 Set the context as active which means it can be accessed via GetContext in serialization methods.
 

Protected Attributes

xiiStreamWriterm_pOriginalStream = nullptr
 
xiiDefaultMemoryStreamStorage m_TempStreamStorage
 
xiiMemoryStreamWriter m_TempStreamWriter
 
xiiHashSet< const xiiRTTI * > 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 xiiStreamWriter 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: