XII Release 0.1.0
Loading...
Searching...
No Matches
xiiWorldWriter Class Reference

Stores an entire xiiWorld in a stream. More...

#include <WorldWriter.h>

Public Member Functions

void WriteWorld (xiiStreamWriter &ref_stream, xiiWorld &ref_world, const xiiTagSet *pExclude=nullptr)
 Writes all content in world to stream.
 
void WriteObjects (xiiStreamWriter &ref_stream, const xiiDeque< const xiiGameObject * > &rootObjects)
 Only writes the given root objects and all their children to the stream.
 
void WriteObjects (xiiStreamWriter &ref_stream, xiiArrayPtr< const xiiGameObject * > rootObjects)
 Only writes the given root objects and all their children to the stream.
 
void WriteGameObjectHandle (const xiiGameObjectHandle &hObject)
 Writes the given game object handle to the stream.
 
void WriteComponentHandle (const xiiComponentHandle &hComponent)
 Writes the given component handle to the stream.
 
xiiStreamWriterGetStream () const
 Accesses the stream to which data is written. Use this in component serialization functions to write data to the stream.
 
const xiiDeque< const xiiGameObject * > & GetAllWrittenRootObjects () const
 Returns an array containing all game object pointers that were written to the stream as root objects.
 
const xiiDeque< const xiiGameObject * > & GetAllWrittenChildObjects () const
 Returns an array containing all game object pointers that were written to the stream as child objects.
 

Detailed Description

Stores an entire xiiWorld in a stream.

Used for exporting a world in binary form either as a level or as a prefab (though there is no difference). Can be used for saving a game, if the exact state of the world shall be stored (e.g. like in an FPS).

Member Function Documentation

◆ WriteComponentHandle()

void xiiWorldWriter::WriteComponentHandle ( const xiiComponentHandle & hComponent)

Writes the given component handle to the stream.

Note
If the handle belongs to a component that is not part of the serialized scene, e.g. an object that was excluded by a tag, this function will assert.

◆ WriteGameObjectHandle()

void xiiWorldWriter::WriteGameObjectHandle ( const xiiGameObjectHandle & hObject)

Writes the given game object handle to the stream.

Note
If the handle belongs to an object that is not part of the serialized scene, e.g. an object that was excluded by a tag, this function will assert.

◆ WriteWorld()

void xiiWorldWriter::WriteWorld ( xiiStreamWriter & ref_stream,
xiiWorld & ref_world,
const xiiTagSet * pExclude = nullptr )

Writes all content in world to stream.

All game objects with tags that overlap with pExclude will be ignored.


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