Emergency 20 Dokumentation  4.2.0
ObjectiveWindowDataSource.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  //[-------------------------------------------------------]
30  class ObjectiveWindowDataSource : public boost::noncopyable
31  {
32 
33 
34  //[-------------------------------------------------------]
35  //[ Public definitions ]
36  //[-------------------------------------------------------]
37  public:
39  {
45  bool accomplished;
46  };
47  struct EventState
48  {
52  };
53 
54 
55  //[-------------------------------------------------------]
56  //[ Public virtual em5::ObjectiveWindowDataSource methods ]
57  //[-------------------------------------------------------]
58  public:
59  // Events
60  virtual uint32 getNumberOfEvents() const = 0;
61  virtual const EventState& getEventState(uint32 index) const = 0;
62  virtual const std::string& getEventName(uint32 index) const = 0;
63  // Objectives
64  virtual uint32 getNumberOfObjectives(const EventState& eventState) const = 0;
65  virtual const ObjectiveState& getObjectiveState(const EventState& eventState, uint32 index) const = 0;
66  virtual const std::string& getObjectiveText(const EventState& eventState, uint32 index) const = 0;
67 
68 
69  //[-------------------------------------------------------]
70  //[ Protected methods ]
71  //[-------------------------------------------------------]
72  protected:
74  inline virtual ~ObjectiveWindowDataSource();
75 
76 
77  };
78 
79 
80 //[-------------------------------------------------------]
81 //[ Namespace ]
82 //[-------------------------------------------------------]
83 } // em5
84 
85 
86 //[-------------------------------------------------------]
87 //[ Implementation ]
88 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Objective::ObjectiveType objectiveType
Objective state.
Definition: ObjectiveWindowDataSource.h:42
virtual ~ObjectiveWindowDataSource()
Definition: ObjectiveWindowDataSource-inl.h:19
unsigned int uint32
Definition: PlatformTypes.h:181
uint32 id
Event ID.
Definition: ObjectiveWindowDataSource.h:49
uint32 id
Objective ID.
Definition: ObjectiveWindowDataSource.h:40
bool accomplished
"true" if the objective is considered to be accomplished, else "false"
Definition: ObjectiveWindowDataSource.h:45
Definition: ObjectiveWindowDataSource.h:38
uint32 currentNumber
Current number.
Definition: ObjectiveWindowDataSource.h:43
virtual uint32 getNumberOfEvents() const =0
uint32 typeId
Objective type ID.
Definition: ObjectiveWindowDataSource.h:41
uint32 playerIndex
Player index.
Definition: ObjectiveWindowDataSource.h:51
ObjectiveType
Definition: Objective.h:70
ObjectiveWindowDataSource()
Definition: ObjectiveWindowDataSource-inl.h:14
FreeplayEvent::State state
Event state.
Definition: ObjectiveWindowDataSource.h:50
Definition: ObjectiveWindowDataSource.h:47
virtual const std::string & getObjectiveText(const EventState &eventState, uint32 index) const =0
Abstract objective window data source interface.
Definition: ObjectiveWindowDataSource.h:30
virtual const std::string & getEventName(uint32 index) const =0
virtual const ObjectiveState & getObjectiveState(const EventState &eventState, uint32 index) const =0
virtual uint32 getNumberOfObjectives(const EventState &eventState) const =0
virtual const EventState & getEventState(uint32 index) const =0
State
Definition: FreeplayEvent.h:90
uint32 neededNumber
Needed number.
Definition: ObjectiveWindowDataSource.h:44