FYP  1.0.0
Final Year Project -- Alexander Meuer
SceneProxy Class Reference
Collaboration diagram for SceneProxy:
Collaboration graph

Public Member Functions

bool handleEvent (sf::Event &event)
 
void update (sf::Time const &elapsedTime)
 
void draw (sf::RenderWindow &w)
 
void cleanup ()
 
void loadNow ()
 
I_ScenegetScene ()
 Gets a pointer to the contained scene.
 

Static Public Member Functions

template<class SceneType >
static SceneProxycreate (std::string const &xmlPath)
 Constructs a SceneProxy, whose contained scene can be constructed by the file specified by xmlPath. Creates a lambda function that constructs a new instance of SceneType using the xmlPath, this function is then called later on when the scene needs to be constructed. More...
 

Private Member Functions

 SceneProxy (std::function< I_Scene *()> const &sceneCreationFunc)
 

Private Attributes

I_ScenemScene
 Actual scene object owned by proxy.
 
std::function< I_Scene *()> mCreatSceneFunc
 The location of the xml file used to create the scene when needed.
 
std::mutex mMutex
 

Member Function Documentation

template<class SceneType >
SceneProxy * SceneProxy::create ( std::string const &  xmlPath)
static

Constructs a SceneProxy, whose contained scene can be constructed by the file specified by xmlPath. Creates a lambda function that constructs a new instance of SceneType using the xmlPath, this function is then called later on when the scene needs to be constructed.

Parameters
xmlPathPath to the xml file used to create the scene.

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