/*! \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(void) { if (!singletonRef) singletonRef = new State(); return singletonRef; }; virtual ~State(void); void setCamera(const PNode* camera, const PNode* cameraTarget); /** \returns a Pointer to the PNode of the Camera */ const PNode* getCamera(void) const { return this->camera; }; /** \returns a Pointer to the CameraTarget */ const PNode* getCameraTarget(void) const { return this->cameraTarget; }; private: State(void); 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 */