<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
SEMechanicalVentilation.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "cdm/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 
19  SEMechanicalVentilation(Logger* logger=nullptr);
20  virtual ~SEMechanicalVentilation();
21 
22  virtual void Clear();
23  virtual void Copy(const SEMechanicalVentilation& src, const SESubstanceManager& subMgr, bool /*preserveState*/=false);
24 
25  virtual bool IsValid() const;
26  virtual bool IsActive() const;
27  virtual void Deactivate();
28 
29  virtual eSwitch GetState() const;
30  virtual void SetState(eSwitch name);
31 
32  virtual bool HasFlow() const;
33  virtual SEScalarVolumePerTime& GetFlow();
34  virtual double GetFlow(const VolumePerTimeUnit& unit) const;
35 
36  virtual bool HasPressure() const;
37  virtual SEScalarPressure& GetPressure();
38  virtual double GetPressure(const PressureUnit& unit) const;
39 
40  bool HasGasFraction() const;
41  bool HasGasFraction(const SESubstance& substance) const;
42  const std::vector<SESubstanceFraction*>& GetGasFractions();
43  const std::vector<const SESubstanceFraction*>& GetGasFractions() const;
44  SESubstanceFraction& GetGasFraction(const SESubstance& substance);
45  const SESubstanceFraction* GetGasFraction(const SESubstance& substance) const;
46  void RemoveGasFraction(const SESubstance& substance);
47  void RemoveGasFractions();
48 
49  bool HasAerosol() const;
50  bool HasAerosol(const SESubstance& substance) const;
51  const std::vector<SESubstanceConcentration*>& GetAerosols();
52  const std::vector<const SESubstanceConcentration*>& GetAerosols() const;
53  SESubstanceConcentration& GetAerosol(const SESubstance& substance);
54  const SESubstanceConcentration* GetAerosol(const SESubstance& substance) const;
55  void RemoveAerosol(const SESubstance& substance);
56  void RemoveAerosols();
57 
58  virtual void ToString(std::ostream &str) const;
59 
60  virtual const SEScalar* GetScalar(const std::string& name);
61 
62 protected:
63 
64  eSwitch m_State;
67 
68  std::vector<SESubstanceFraction*> m_GasFractions;
69  std::vector<const SESubstanceFraction*> m_cGasFractions;
70 
71  std::vector<SESubstanceConcentration*> m_Aerosols;
72  std::vector<const SESubstanceConcentration*> m_cAerosols;
73 };
Definition: SESubstanceManager.h:8
virtual const SEScalar * GetScalar(const std::string &name)=0
Definition: SEPatientAction.h:7
Definition: SESubstanceFraction.h:9
Definition: SEScalar.h:18
SEScalarVolumePerTime * m_Flow
Definition: SEMechanicalVentilation.h:65
Definition: Logger.h:66
virtual void Clear()
Definition: SEPatientAction.cpp:17
Definition: SEScalarPressure.h:28
Definition: SEMechanicalVentilation.h:12
std::vector< SESubstanceConcentration * > m_Aerosols
Definition: SEMechanicalVentilation.h:71
Definition: SEScalarVolumePerTime.h:7
SEScalarPressure * m_Pressure
Definition: SEMechanicalVentilation.h:66
virtual void Deactivate()
Definition: SEAction.h:34
Definition: SEScalarPressure.h:7
virtual bool IsValid() const
Definition: SEPatientAction.cpp:22
static SEAction * Copy(const SEAction &, const SESubstanceManager &)
Definition: SEAction.cpp:45
Definition: SESubstanceConcentration.h:10
Definition: SEScalarVolumePerTime.h:30
std::vector< const SESubstanceFraction * > m_cGasFractions
Definition: SEMechanicalVentilation.h:69
virtual bool IsActive() const
Definition: SEAction.h:32
eSwitch m_State
Definition: SEMechanicalVentilation.h:64
Definition: PBPatientActions.h:46
virtual void ToString(std::ostream &str) const =0
std::vector< SESubstanceFraction * > m_GasFractions
Definition: SEMechanicalVentilation.h:68
std::vector< const SESubstanceConcentration * > m_cAerosols
Definition: SEMechanicalVentilation.h:72
Definition: SESubstance.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.