Emergency 20 Dokumentation  4.2.0
DefaultObjectiveWindowDataSource.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 definitions ]
36  //[-------------------------------------------------------]
37  public:
38  struct LiveObjectiveState : public ObjectiveState
39  {
40  std::string text;
41  };
42  typedef std::vector<LiveObjectiveState> LiveObjectiveStates;
43 
44  struct LiveEventState : public EventState
45  {
46  std::string name;
47  LiveObjectiveStates liveObjectiveStates;
48  };
49  typedef std::vector<LiveEventState> LiveEventStates;
50 
51 
52  //[-------------------------------------------------------]
53  //[ Public methods ]
54  //[-------------------------------------------------------]
55  public:
57  inline virtual ~DefaultObjectiveWindowDataSource();
58  void captureCurrentState();
59 
60 
61  //[-------------------------------------------------------]
62  //[ Public virtual em5::ObjectiveWindowDataSource methods ]
63  //[-------------------------------------------------------]
64  public:
65  // Events
66  virtual uint32 getNumberOfEvents() const override;
67  virtual const EventState& getEventState(uint32 index) const override;
68  virtual const std::string& getEventName(uint32 index) const override;
69  // Objectives
70  virtual uint32 getNumberOfObjectives(const EventState& eventState) const override;
71  virtual const ObjectiveState& getObjectiveState(const EventState& eventState, uint32 index) const override;
72  virtual const std::string& getObjectiveText(const EventState& eventState, uint32 index) const override;
73 
74 
75  //[-------------------------------------------------------]
76  //[ Private data ]
77  //[-------------------------------------------------------]
78  private:
79  LiveEventStates mLiveEventStates;
80 
81 
82  };
83 
84 
85 //[-------------------------------------------------------]
86 //[ Namespace ]
87 //[-------------------------------------------------------]
88 } // em5
89 
90 
91 //[-------------------------------------------------------]
92 //[ Implementation ]
93 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
DefaultObjectiveWindowDataSource()
Definition: DefaultObjectiveWindowDataSource-inl.h:14
Definition: DefaultObjectiveWindowDataSource.h:38
unsigned int uint32
Definition: PlatformTypes.h:181
std::string text
Objective text.
Definition: DefaultObjectiveWindowDataSource.h:40
Definition: ObjectiveWindowDataSource.h:38
EMERGENCY 5 objective window data source default implementation which holds and manages the live stat...
Definition: DefaultObjectiveWindowDataSource.h:30
virtual const std::string & getEventName(uint32 index) const override
LiveObjectiveStates liveObjectiveStates
Live objective states of the event.
Definition: DefaultObjectiveWindowDataSource.h:47
std::string name
Event name hash.
Definition: DefaultObjectiveWindowDataSource.h:46
std::vector< LiveEventState > LiveEventStates
Definition: DefaultObjectiveWindowDataSource.h:49
Definition: ObjectiveWindowDataSource.h:47
virtual uint32 getNumberOfObjectives(const EventState &eventState) const override
Abstract objective window data source interface.
Definition: ObjectiveWindowDataSource.h:30
virtual ~DefaultObjectiveWindowDataSource()
Definition: DefaultObjectiveWindowDataSource-inl.h:19
virtual uint32 getNumberOfEvents() const override
virtual const std::string & getObjectiveText(const EventState &eventState, uint32 index) const override
Definition: DefaultObjectiveWindowDataSource.h:44
std::vector< LiveObjectiveState > LiveObjectiveStates
Definition: DefaultObjectiveWindowDataSource.h:42
virtual const ObjectiveState & getObjectiveState(const EventState &eventState, uint32 index) const override
virtual const EventState & getEventState(uint32 index) const override