Emergency 20 Dokumentation  4.2.0
BaseTreatmentLogic.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/audio/AudioProxy.h"
14 
16 #include <qsf/job/JobProxy.h>
17 
18 
19 //[-------------------------------------------------------]
20 //[ Forward declarations ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24  class TreatmentInformation;
25  class Diagnosis;
26  class MedicalCare;
27 }
28 
29 
30 //[-------------------------------------------------------]
31 //[ Namespace ]
32 //[-------------------------------------------------------]
33 namespace em5
34 {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Classes ]
39  //[-------------------------------------------------------]
46  {
47 
48 
49  //[-------------------------------------------------------]
50  //[ Public definitions ]
51  //[-------------------------------------------------------]
52  public:
53  static const uint32 GAMELOGIC_TYPE_ID; // "em5::BaseTreatmentLogic" game logic type ID
54 
55 
56  //[-------------------------------------------------------]
57  //[ Public methods ]
58  //[-------------------------------------------------------]
59  public:
65  BaseTreatmentLogic(uint32 gameLogicTypeId);
66 
71  virtual ~BaseTreatmentLogic();
72 
77  void initWithDiagnosis(qsf::Entity& targetEntity, qsf::Entity& doctorEntity, const Diagnosis& diagnosis);
78  void initWithMedicalCare(qsf::Entity& targetEntity, qsf::Entity& doctorEntity, const MedicalCare& medicalCare);
79 
80  virtual void playFinishAnimation();
81 
82 
83  //[-------------------------------------------------------]
84  //[ Public virtual qsf::GameLogic methods ]
85  //[-------------------------------------------------------]
86  public:
87  virtual void serialize(qsf::BinarySerializer& serializer) override;
88  virtual bool onStartup() override;
89  virtual void onShutdown() override;
90 
91 
92  //[-------------------------------------------------------]
93  //[ Protected virtual methods ]
94  //[-------------------------------------------------------]
95  protected:
96  // Job update
97  virtual void updateSimulation(const qsf::JobArguments& jobArguments);
98  virtual qsf::Entity* createEquipment(const std::string& equipmentName, qsf::Entity& parent);
99  virtual void startTreatment();
100  virtual bool startLoopedTreatment();
101  virtual void pushDoctorBagToTargetAnimation();
102 
103 
104  //[-------------------------------------------------------]
105  //[ Protected data ]
106  //[-------------------------------------------------------]
107  protected:
116  std::string mDoctorAnimation;
124 
125 
126  //[-------------------------------------------------------]
127  //[ CAMP reflection system ]
128  //[-------------------------------------------------------]
129  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
130 
131 
132  };
133 
134 
135 //[-------------------------------------------------------]
136 //[ Namespace ]
137 //[-------------------------------------------------------]
138 } // em5
139 
140 
141 //[-------------------------------------------------------]
142 //[ CAMP reflection system ]
143 //[-------------------------------------------------------]
MedicalCare * mMedicalCare
Definition: BaseTreatmentLogic.h:113
Definition: ActionPriority.h:13
static const uint32 GAMELOGIC_TYPE_ID
Definition: BaseTreatmentLogic.h:53
Diagnosis definition class.
Definition: TreatmentInformation.h:35
Diagnosis * mDiagnosis
Definition: BaseTreatmentLogic.h:112
Job proxy class.
Definition: JobProxy.h:51
EMERGENCY 5 base treatment logic Parent class for treatment process with doctor and target patient...
Definition: BaseTreatmentLogic.h:45
Entity class.
Definition: Entity.h:46
unsigned int uint32
Definition: PlatformTypes.h:181
qsf::WeakPtr< qsf::Entity > mTargetEntity
Definition: BaseTreatmentLogic.h:108
#define EM5_API_EXPORT
Definition: Export.h:28
qsf::WeakPtr< qsf::Entity > mDoctorEquipment
Definition: BaseTreatmentLogic.h:110
std::string mDoctorEquipmentMainName
Definition: BaseTreatmentLogic.h:117
AudioProxy mAudioProxy
Definition: BaseTreatmentLogic.h:123
qsf::Time mUsingTime
Definition: BaseTreatmentLogic.h:114
Job arguments class: holds data to be passed to the called job method by the job manager.
Definition: JobArguments.h:40
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
bool mCanPlayFinishAnimation
Definition: BaseTreatmentLogic.h:120
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
Extended audio proxy for easier multiplay usage.
Definition: AudioProxy.h:47
std::string mDoctorAnimation
Definition: BaseTreatmentLogic.h:116
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
TreatmentInformation * mTreatmentInformation
Definition: BaseTreatmentLogic.h:111
Game logic base class.
Definition: GameLogic.h:44
bool mCanPlayLoopAnimation
Definition: BaseTreatmentLogic.h:119
Diagnosis definition class.
Definition: Diagnosis.h:30
bool mCanStartTreatment
Definition: BaseTreatmentLogic.h:118
bool mDoctorCanStandUp
Definition: BaseTreatmentLogic.h:121
qsf::JobProxy mSimulationJobProxy
Definition: BaseTreatmentLogic.h:122
qsf::Time mTimeRunning
Definition: BaseTreatmentLogic.h:115
Binary serializer class.
Definition: BinarySerializer.h:35
Medical care step definition class.
Definition: MedicalCare.h:30
qsf::WeakPtr< qsf::Entity > mDoctorEntity
Definition: BaseTreatmentLogic.h:109
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32