Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/objectmanager/src/util/state.h @ 6121

Last change on this file since 6121 was 6121, checked in by bensch, 18 years ago

orxonox/trunk: packing the first entities into their lists

File size: 2.2 KB
Line 
1/*!
2 * @file state.h
3 * Definition of the States Class
4*/
5
6#ifndef _STATE_H
7#define _STATE_H
8
9// FORWARD DECLARATION
10class PNode;
11class WorldEntity;
12template<class T> class tList;
13class ObjectManager;
14
15//! handles states about orxonox's most importatn objects
16/**
17 * This is an abstract Class-container, not really a Class.
18 * in this Class only static references to the most important
19 * Objects/List/etc. are stored.
20 */
21class State {
22
23 public:
24   //////////////
25   /// CAMERA ///
26   //////////////
27  /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */
28  static void setCamera(const PNode* camera, const PNode* cameraTarget);
29  /** @returns a Pointer to the PNode of the Camera */
30  static inline const PNode* getCamera() { return State::camera; };
31  /** @returns a Pointer to the CameraTarget */
32  static inline const PNode* getCameraTarget() { return State::cameraTarget; };
33
34  //////////////////////
35  /// OBJECT-MANAGER ///
36  //////////////////////
37  /** @param objectManager the new Current ObjectManager */
38  static inline void setObjectManager(ObjectManager* objectManager) { State::objectManager = objectManager; };
39  /** @returns the current ObjectManager. */
40  static inline ObjectManager* getObjectManager() { return State::objectManager; };
41
42  /////////////////////////
43  /// WORLD_ENTITY_LIST ///
44  /////////////////////////
45  /** @param worldEntityList The World's List of WorldEntities */
46  static inline void setWorldEntityList(tList<WorldEntity>* worldEntityList) { State::worldEntityList = worldEntityList; };
47  /** @returns the List of WorldEntities */
48  static inline tList<WorldEntity>* getWorldEntityList() { return State::worldEntityList; };
49
50 private:
51  State();
52
53  static const PNode*           camera;             //!< A reference to the camera
54  static const PNode*           cameraTarget;       //!< A reference to the cameraTarget
55  static PNode*                 nullParent;         //!< A reference to the Null-PNode.
56  static ObjectManager*         objectManager;      //!< A referenct to the current ObjectManager
57
58  static tList<WorldEntity>*    worldEntityList;    //!< The List of the worldEntities
59
60  //tStack<
61};
62
63#endif /* _STATE_H */
Note: See TracBrowser for help on using the repository browser.