Emergency 20 Dokumentation  4.2.0
ObserverHelper.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
14 
15 
16 //[-------------------------------------------------------]
17 //[ Namespace ]
18 //[-------------------------------------------------------]
19 namespace em5
20 {
21 
22 
23  //[-------------------------------------------------------]
24  //[ Classes ]
25  //[-------------------------------------------------------]
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public methods ]
36  //[-------------------------------------------------------]
37  public:
42  explicit ObserverHelper(FreeplayEvent& freeplayEvent);
43 
48  ~ObserverHelper();
49 
50 
51  //[-------------------------------------------------------]
52  //[ Public methods ]
53  //[-------------------------------------------------------]
58  template<typename T>
59  T& createObserver(uint64 entityId) const;
60 
65  template<typename T>
66  T& createGeneralObserver() const;
67 
68 
69  //[-------------------------------------------------------]
70  //[ Private data ]
71  //[-------------------------------------------------------]
72  private:
73  FreeplayEvent& mEvent;
74 
75 
76  };
77 
78 
79 //[-------------------------------------------------------]
80 //[ Namespace ]
81 //[-------------------------------------------------------]
82 } // em5
83 
84 
85 //[-------------------------------------------------------]
86 //[ Implementation ]
87 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
#define EM5_API_EXPORT
Definition: Export.h:28
uint64_t uint64
Definition: PlatformTypes.h:184
Observer helper can create observers.
Definition: ObserverHelper.h:30
Abstract EMERGENCY 5 freeplay event base class.
Definition: FreeplayEvent.h:66