Emergency 20 Dokumentation  4.2.0
SelectionManager.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 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace qsf
23 {
24  class BinarySerializer;
25 }
26 
27 
28 //[-------------------------------------------------------]
29 //[ Namespace ]
30 //[-------------------------------------------------------]
31 namespace em5
32 {
33 
34 
35  //[-------------------------------------------------------]
36  //[ Classes ]
37  //[-------------------------------------------------------]
43  {
44 
45 
46  //[-------------------------------------------------------]
47  //[ Public methods ]
48  //[-------------------------------------------------------]
49  public:
54  inline SelectionManager();
55 
60  inline virtual ~SelectionManager();
61 
66  inline void serialize(qsf::BinarySerializer& serializer);
67 
68  void startup();
69  void shutdown();
70 
75  void setAutomaticSpawnedUnitSelection(bool automaticSelection);
76 
77  // TODO(mk) Override the setSelectionById() to emit the message "Messages::EM5_CHANGE_SELECTION". So we are able to detect all selection changes automatically
78  // TODO(co) Removed "override" since those are not virtual methods. Fixed broken build. Since those base classes please don't make those virtual without talking to me.
79  void setSelectionById(uint64 id);
80  void setSelectionByIdSet(const boost::container::flat_set<uint64>& idSet);
81 
82 
83  //[-------------------------------------------------------]
84  //[ Private methods ]
85  //[-------------------------------------------------------]
86  private:
87  void onSelectionChange();
88  void onUnitSpawnedPlayerUpdateSelection(const qsf::MessageParameters& parameters);
89 
90 
91  //[-------------------------------------------------------]
92  //[ Private data ]
93  //[-------------------------------------------------------]
94  private:
95  qsf::MessageProxy mUnitSpawnedPlayerUpdateSelectionMessageProxy;
96 
97 
98  };
99 
100 
101 //[-------------------------------------------------------]
102 //[ Namespace ]
103 //[-------------------------------------------------------]
104 } // em5
105 
106 
107 //[-------------------------------------------------------]
108 //[ Implementation ]
109 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Message parameters class.
Definition: MessageParameters.h:34
#define EM5_API_EXPORT
Definition: Export.h:28
Message listener proxy class.
Definition: MessageProxy.h:47
uint64_t uint64
Definition: PlatformTypes.h:184
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
Definition: PickupPersonByParamedicAction.h:21
EMERGENCY 5 selection manager class.
Definition: SelectionManager.h:42
QSF entity selection manager class.
Definition: EntitySelectionManager.h:30
Binary serializer class.
Definition: BinarySerializer.h:35