Emergency 20 Dokumentation  4.2.0
CivilShipComponent.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  static const uint32 COMPONENT_ID;
39 
40 
41  //[-------------------------------------------------------]
42  //[ Public methods ]
43  //[-------------------------------------------------------]
44  public:
52  explicit CivilShipComponent(qsf::Prototype* prototype);
53 
58  virtual ~CivilShipComponent();
59 
64  uint64 getPathEntityId() const;
65  void setPathEntityId(uint64 pathEntityId);
66 
67 
68  //[-------------------------------------------------------]
69  //[ Public virtual qsf::Component methods ]
70  //[-------------------------------------------------------]
71  public:
72  virtual void serialize(qsf::BinarySerializer& serializer) override;
73  virtual bool onStartup() override;
74 
75 
76  //[-------------------------------------------------------]
77  //[ Private methods ]
78  //[-------------------------------------------------------]
79  private:
80  void updatePath(const qsf::JobArguments& arguments);
81  bool followPath();
82 
83 
84  //[-------------------------------------------------------]
85  //[ Private data ]
86  //[-------------------------------------------------------]
87  private:
88  uint64 mPathEntityId;
89  qsf::JobProxy mUpdateJobProxy;
90 
91 
92  //[-------------------------------------------------------]
93  //[ CAMP reflection system ]
94  //[-------------------------------------------------------]
95  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
96 
97 
98  };
99 
100 
101 //[-------------------------------------------------------]
102 //[ Namespace ]
103 //[-------------------------------------------------------]
104 } // em5
105 
106 
107 //[-------------------------------------------------------]
108 //[ CAMP reflection system ]
109 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Job proxy class.
Definition: JobProxy.h:51
Abstract component class.
Definition: Component.h:105
unsigned int uint32
Definition: PlatformTypes.h:181
static const uint32 COMPONENT_ID
"em5::CivilShipComponent" unique component ID
Definition: CivilShipComponent.h:38
#define EM5_API_EXPORT
Definition: Export.h:28
uint64_t uint64
Definition: PlatformTypes.h:184
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
EMERGENCY 5 civil ship component class.
Definition: CivilShipComponent.h:30
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
Prototype class.
Definition: Prototype.h:100
Binary serializer class.
Definition: BinarySerializer.h:35