Emergency 20 Dokumentation  4.2.0
SpawnGroupComponent.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 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
41  static const uint32 COMPONENT_ID;
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
55  inline explicit SpawnGroupComponent(qsf::Prototype* prototype);
56 
61  inline virtual ~SpawnGroupComponent();
62 
63  inline uint32 getSpawnGroup() const;
64  inline void setSpawnGroup(uint32 group);
65 
66  inline const qsf::NamedIdentifier& getSpawnTag() const;
67  inline void setSpawnTag(const qsf::NamedIdentifier& tag);
68 
69 
70  //[-------------------------------------------------------]
71  //[ Public virtual qsf::Component methods ]
72  //[-------------------------------------------------------]
73  public:
74  virtual void serialize(qsf::BinarySerializer& serializer) override;
75 
76 
77  //[-------------------------------------------------------]
78  //[ Private data ]
79  //[-------------------------------------------------------]
80  private:
81  uint32 mSpawnGroup;
82  qsf::NamedIdentifier mSpawnTag;
83 
84 
85  //[-------------------------------------------------------]
86  //[ CAMP reflection system ]
87  //[-------------------------------------------------------]
88  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
89 
90 
91  };
92 
93 
94 //[-------------------------------------------------------]
95 //[ Namespace ]
96 //[-------------------------------------------------------]
97 } // em5
98 
99 
100 //[-------------------------------------------------------]
101 //[ Implementation ]
102 //[-------------------------------------------------------]
104 
105 
106 //[-------------------------------------------------------]
107 //[ CAMP reflection system ]
108 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Abstract component class.
Definition: Component.h:105
unsigned int uint32
Definition: PlatformTypes.h:181
#define EM5_API_EXPORT
Definition: Export.h:28
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
static const uint32 COMPONENT_ID
"em5::SpawnGroupComponent" unique component ID
Definition: SpawnGroupComponent.h:41
Marks an entity as being part of a spawn group.
Definition: SpawnGroupComponent.h:33
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Prototype class.
Definition: Prototype.h:100
Binary serializer class.
Definition: BinarySerializer.h:35