SEMechanicalVentilation.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "patient/actions/SEPatientAction.h"
6 class Serializer;
7 class SESubstance;
10 class SEMechanicalVentilationConfiguration;
11 
13 {
14  friend class PBPatientAction;//friend the serialization class
15 protected:
16 
17 public:
18 
20  virtual ~SEMechanicalVentilation();
21 
22  virtual void Clear();
23  virtual void Copy(const SEMechanicalVentilation& src, const SESubstanceManager& subMgr);
24 
25  virtual bool IsValid() const;
26  virtual bool IsActive() const;
27 
28  virtual eSwitch GetState() const;
29  virtual void SetState(eSwitch name);
30 
31  virtual bool HasFlow() const;
32  virtual SEScalarVolumePerTime& GetFlow();
33  virtual double GetFlow(const VolumePerTimeUnit& unit) const;
34 
35  virtual bool HasPressure() const;
36  virtual SEScalarPressure& GetPressure();
37  virtual double GetPressure(const PressureUnit& unit) const;
38 
39  bool HasGasFraction() const;
40  bool HasGasFraction(const SESubstance& substance) const;
41  const std::vector<SESubstanceFraction*>& GetGasFractions();
42  const std::vector<const SESubstanceFraction*>& GetGasFractions() const;
43  SESubstanceFraction& GetGasFraction(SESubstance& substance);
44  const SESubstanceFraction* GetGasFraction(const SESubstance& substance) const;
45  void RemoveGasFraction(const SESubstance& substance);
46  void RemoveGasFractions();
47 
48  bool HasAerosol() const;
49  bool HasAerosol(const SESubstance& substance) const;
50  const std::vector<SESubstanceConcentration*>& GetAerosols();
51  const std::vector<const SESubstanceConcentration*>& GetAerosols() const;
52  SESubstanceConcentration& GetAerosol(SESubstance& substance);
53  const SESubstanceConcentration* GetAerosol(const SESubstance& substance) const;
54  void RemoveAerosol(const SESubstance& substance);
55  void RemoveAerosols();
56 
57  virtual void ToString(std::ostream &str) const;
58 protected:
59 
60  std::stringstream m_ss;
61 
62  eSwitch m_State;
65 
66  std::vector<SESubstanceFraction*> m_GasFractions;
67  std::vector<const SESubstanceFraction*> m_cGasFractions;
68 
69  std::vector<SESubstanceConcentration*> m_Aerosols;
70  std::vector<const SESubstanceConcentration*> m_cAerosols;
71 };
Definition: SESubstanceManager.h:8
Definition: SEPatientAction.h:7
Definition: SESubstanceFraction.h:10
SEScalarVolumePerTime * m_Flow
Definition: SEMechanicalVentilation.h:63
virtual void Clear()
Definition: SEPatientAction.cpp:17
static void Copy(const SEAcuteStress &src, SEAcuteStress &dst)
Definition: PBPatientActions.cpp:76
Definition: SEScalarPressure.h:23
std::stringstream m_ss
Definition: SEMechanicalVentilation.h:60
Definition: SEMechanicalVentilation.h:12
std::vector< SESubstanceConcentration * > m_Aerosols
Definition: SEMechanicalVentilation.h:69
Definition: SEScalarVolumePerTime.h:7
SEScalarPressure * m_Pressure
Definition: SEMechanicalVentilation.h:64
Definition: SEScalarPressure.h:7
virtual bool IsValid() const
Definition: SEPatientAction.cpp:22
Definition: SESubstanceConcentration.h:10
Definition: SEScalarVolumePerTime.h:26
std::vector< const SESubstanceFraction * > m_cGasFractions
Definition: SEMechanicalVentilation.h:67
virtual bool IsActive() const
Definition: SEAction.h:21
eSwitch m_State
Definition: SEMechanicalVentilation.h:62
Definition: PBPatientActions.h:38
virtual void ToString(std::ostream &str) const =0
std::vector< SESubstanceFraction * > m_GasFractions
Definition: SEMechanicalVentilation.h:66
std::vector< const SESubstanceConcentration * > m_cAerosols
Definition: SEMechanicalVentilation.h:70
Definition: SESubstance.h:14