Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 4809 was 4746, checked in by bensch, 19 years ago

orxonox/trunk: changed (void) → ()

File size: 1.0 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 */
[4746]19  inline static State* getInstance() { if (!singletonRef) singletonRef = new State();  return singletonRef; };
[4485]20
[4746]21  virtual ~State();
[3655]22
[4293]23  void setCamera(const PNode* camera, const PNode* cameraTarget);
[4485]24  /** \returns a Pointer to the PNode of the Camera */
[4746]25  const PNode* getCamera() const { return this->camera; };
[4485]26  /** \returns a Pointer to the CameraTarget */
[4746]27  const PNode* getCameraTarget() const { return this->cameraTarget; };
[4293]28
[3655]29 private:
[4746]30  State();
[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.