Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rune::SceneSerializer Class Reference

An object that can be used to write a GameScene to a YAML encoded file. More...

#include <SceneSerializer.h>

Public Member Functions

 SceneSerializer (rune::GameScene &scene)
 Default constructor to create a SceneSerializer. More...
 
void serialize (const std::string &filePath)
 Serialize the scene to a human readable file. More...
 
void serializeRuntime (const std::string &filePath)
 Serialize the scene to binary. More...
 
void deserialize (const std::string &filePath)
 Read the scene back in from a file. More...
 
void deserializeRuntime (const std::string &filePath)
 Read the scene back in from a binary file. More...
 
void serializeObject (YAML::Emitter &out, rune::GameObject &)
 Serialize a GameObject to YAML. More...
 

Public Attributes

std::string sceneName
 A string identifier for the stored scene, this will be written to the file.
 

Detailed Description

An object that can be used to write a GameScene to a YAML encoded file.

Author
Thomas Montano
Date
February 1 2021

Constructor & Destructor Documentation

◆ SceneSerializer()

rune::SceneSerializer::SceneSerializer ( rune::GameScene scene)

Default constructor to create a SceneSerializer.

Parameters
sceneThe scene that should be serialized.

Member Function Documentation

◆ deserialize()

void rune::SceneSerializer::deserialize ( const std::string &  filePath)

Read the scene back in from a file.

Parameters
filePathThe location of the YAML source file.

◆ deserializeRuntime()

void rune::SceneSerializer::deserializeRuntime ( const std::string &  filePath)

Read the scene back in from a binary file.

Parameters
filePathThe location of the YAML source file.

◆ serialize()

void rune::SceneSerializer::serialize ( const std::string &  filePath)

Serialize the scene to a human readable file.

Parameters
filePathThe location of the YAML source file.

◆ serializeObject()

void rune::SceneSerializer::serializeObject ( YAML::Emitter &  out,
rune::GameObject object 
)

Serialize a GameObject to YAML.

Parameters
outThe YAML buffer that is currently being written to.
objectThe GameObject that is going to be written to a file.

◆ serializeRuntime()

void rune::SceneSerializer::serializeRuntime ( const std::string &  filePath)

Serialize the scene to binary.

Parameters
filePathThe location of the YAML source file.

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