5 #include <StaticScene.h>
8 #include <boost/serialization/export.hpp>
25 friend class boost::serialization::access;
32 template <
class Archive>
33 void serialize(Archive &ar,
const unsigned int version){
34 boost::serialization::void_cast_register<SerialSceneWrapper, Asset>();
35 ar &boost::serialization::base_object<Asset>(*
this);
46 }
case DYNAMIC_SCENE:{
Base class for all assets.
Definition: Asset.h:10
Dynamic scene base implementation.
Definition: DynScene.h:29
Class representing a scene asset.
Definition: Scene.h:28
Wrapper for scenes which assists read and write serialization operations depending on the type of sce...
Definition: SerialSceneWrapper.h:21
static SerialSceneWrapper * readScene(std::string const &path)
Read serialized scene from given file, automatically handling the scene type to be read.
Definition: SerialSceneWrapper.cpp:14
DynScene * getDynScene() const
Obtain the scene being wrapped as a DynScene.
Definition: SerialSceneWrapper.h:151
SceneType getSceneType() const
Obtain the type of scene being wrapped.
Definition: SerialSceneWrapper.h:111
void serialize(Archive &ar, const unsigned int version)
Serialize a SerialSceneWrapper to a stream of bytes.
Definition: SerialSceneWrapper.h:33
SceneType
Types of scene that can be handled by the SerialSceneWrapper.
Definition: SerialSceneWrapper.h:61
Scene * getScene() const
Obtain the scene being wrapped.
Definition: SerialSceneWrapper.h:128
void setSceneType(SceneType const &sceneType)
Set the type of scene being wrapped.
Definition: SerialSceneWrapper.h:118
SceneType sceneType
Type of the scene being wrapped.
Definition: SerialSceneWrapper.h:69
SerialSceneWrapper()
Default constructor for serial scene wrapper.
Definition: SerialSceneWrapper.h:81
void setScene(Scene *scene)
Set the scene being wrapped.
Definition: SerialSceneWrapper.h:135
StaticScene * getStaticScene() const
Obtain the scene being wrapped as a StaticScene.
Definition: SerialSceneWrapper.h:143
void writeScene(std::string const &path)
Serialize the scene writing it to given output file.
Definition: SerialSceneWrapper.cpp:7
Scene * scene
Pointer to the scene being wrapped.
Definition: SerialSceneWrapper.h:73
Static scene basic implementation.
Definition: StaticScene.h:24