![]() |
XII Release 0.1.0
|
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. | |
xiiStreamWriter & | GetStream () 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. | |
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).
void xiiWorldWriter::WriteComponentHandle | ( | const xiiComponentHandle & | hComponent | ) |
Writes the given component handle to the stream.
void xiiWorldWriter::WriteGameObjectHandle | ( | const xiiGameObjectHandle & | hObject | ) |
Writes the given game object handle to the stream.
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.