/*! \file state.h \brief Definition of the States-singleton Class */ #ifndef _STATE_H #define _STATE_H #include "base_object.h" // FORWARD DEFINITION class PNode; //! A Singleton class, that handles some states about orxonox's objects class State : public BaseObject { public: /** \returns a Pointer to the only object of this Class */ inline static State* getInstance() { if (!singletonRef) singletonRef = new State(); return singletonRef; }; virtual ~State(); void setCamera(const PNode* camera, const PNode* cameraTarget); /** \returns a Pointer to the PNode of the Camera */ const PNode* getCamera() const { return this->camera; }; /** \returns a Pointer to the CameraTarget */ const PNode* getCameraTarget() const { return this->cameraTarget; }; private: State(); static State* singletonRef; //!< a reference to this class const PNode* camera; //!< A reference to the camera const PNode* cameraTarget; //!< a reference to the cameraTarget }; #endif /* _STATE_H */