Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/util/state.h @ 4652

Last change on this file since 4652 was 4597, checked in by bensch, 19 years ago

orxonox/trunk: setClassID implemented in all files

File size: 1.1 KB
RevLine 
[4597]1/*!
[4485]2    \file state.h
[4293]3    \brief Definition of the States-singleton Class
[3655]4*/
5
[4293]6#ifndef _STATE_H
7#define _STATE_H
[3655]8
9#include "base_object.h"
10
[4178]11// FORWARD DEFINITION
[4293]12class PNode;
[3655]13
[4293]14//! A Singleton class, that handles some states about orxonox's objects
15class State : public BaseObject {
[3655]16
17 public:
[4485]18  /** \returns a Pointer to the only object of this Class */
19  inline static State* getInstance(void) { if (!singletonRef) singletonRef = new State();  return singletonRef; };
20
[4293]21  virtual ~State(void);
[3655]22
[4293]23  void setCamera(const PNode* camera, const PNode* cameraTarget);
[4485]24  /** \returns a Pointer to the PNode of the Camera */
[4293]25  const PNode* getCamera(void) const { return this->camera; };
[4485]26  /** \returns a Pointer to the CameraTarget */
[4293]27  const PNode* getCameraTarget(void) const { return this->cameraTarget; };
28
[3655]29 private:
[4293]30  State(void);
[4485]31  static State*       singletonRef;       //!< a reference to this class
[4293]32
[4485]33  const PNode*        camera;             //!< A reference to the camera
34  const PNode*        cameraTarget;       //!< a reference to the cameraTarget
[3655]35};
36
[4293]37#endif /* _STATE_H */
Note: See TracBrowser for help on using the repository browser.