Emergency 20 Dokumentation  4.2.0
HealthSystem-inl.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Includes ]
6 //[-------------------------------------------------------]
8 
9 
10 //[-------------------------------------------------------]
11 //[ Namespace ]
12 //[-------------------------------------------------------]
13 namespace em5
14 {
15 
16 
17  //[-------------------------------------------------------]
18  //[ Public methods ]
19  //[-------------------------------------------------------]
21  {
22  // It's safe in here to cast the pointer to a reference because we know that the pointer is never ever a null pointer
23  QSF_ASSERT(nullptr != mInjuryManager, "EM5: The injury manager is invalid", QSF_REACT_THROW);
24  return *mInjuryManager;
25  }
26 
28  {
29  // It's safe in here to cast the pointer to a reference because we know that the pointer is never ever a null pointer
30  QSF_ASSERT(nullptr != mDiagnosisManager, "EM5: The diagnosis manager is invalid", QSF_REACT_THROW);
31  return *mDiagnosisManager;
32  }
33 
35  {
36  // It's safe in here to cast the pointer to a reference because we know that the pointer is never ever a null pointer
37  QSF_ASSERT(nullptr != mMedicalCareManager, "EM5: The medical care manager is invalid", QSF_REACT_THROW);
38  return *mMedicalCareManager;
39  }
40 
42  {
43  return mHealthSimulationActive;
44  }
45 
46 
47  //[-------------------------------------------------------]
48  //[ Public virtual qsf::System methods ]
49  //[-------------------------------------------------------]
50  inline const char* HealthSystem::getName() const
51  {
52  return "Health system";
53  }
54 
55 
56 //[-------------------------------------------------------]
57 //[ Namespace ]
58 //[-------------------------------------------------------]
59 } // em5
Definition: ActionPriority.h:13
bool getHealthSimulationActive() const
Definition: HealthSystem-inl.h:41
virtual const char * getName() const override
Get the name of the system.
Definition: HealthSystem-inl.h:50
#define QSF_REACT_THROW
Definition: ErrorHandling.h:203
Manager for medical care definitions.
Definition: MedicalCareManager.h:32
MedicalCareManager & getMedicalCareManager() const
Get the medical care manager instance, do not delete it.
Definition: HealthSystem-inl.h:34
InjuryManager & getInjuryManager() const
Get the injury manager instance, do not delete it.
Definition: HealthSystem-inl.h:20
Manager for diagnosis definitions.
Definition: DiagnosisManager.h:32
DiagnosisManager & getDiagnosisManager() const
Get the diagnosis manager instance, do not delete it.
Definition: HealthSystem-inl.h:27
#define QSF_ASSERT(condition, explanation, reaction)
Definition: ErrorHandling.h:138
Manager for injury definitions.
Definition: InjuryManager.h:32