<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
SEBagValveMask.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "cdm/properties/SEScalar.h"
6 #include "cdm/system/equipment/SEEquipment.h"
7 class SEEventHandler;
9 class SESubstance;
12 
13 class CDM_DECL SEBagValveMask : public SEEquipment
14 {
15  friend class PBBagValveMask;//friend the serialization class
16 protected:
18 public:
19 
20  SEBagValveMask(Logger* logger);
21  virtual ~SEBagValveMask();
22 
23  virtual void Clear();
24 
25  bool SerializeToString(std::string& output, eSerializationFormat m) const;
26  bool SerializeToFile(const std::string& filename) const;
27  bool SerializeFromString(const std::string& src, eSerializationFormat m, const SESubstanceManager& subMgr);
28  bool SerializeFromFile(const std::string& filename, const SESubstanceManager& subMgr);
29 
30 protected:
31 
37  virtual void StateChange(){};
38  virtual void Merge(const SEBagValveMask& from, SESubstanceManager& subMgr);
39  virtual void ProcessConfiguration(SEBagValveMaskConfiguration& config, SESubstanceManager& subMgr);
40 
41 public:
42 
43  virtual const SEScalar* GetScalar(const std::string& name);
44 
45  virtual eBreathState GetBreathState() const;
46  virtual void SetBreathState(eBreathState c);
47 
48  virtual eSwitch GetConnection() const;
49  virtual void SetConnection(eSwitch c);
50 
51  virtual bool HasBagResistance() const;
52  virtual SEScalarPressureTimePerVolume& GetBagResistance();
53  virtual double GetBagResistance(const PressureTimePerVolumeUnit& unit) const;
54 
55  virtual bool HasFilterResistance() const;
56  virtual SEScalarPressureTimePerVolume& GetFilterResistance();
57  virtual double GetFilterResistance(const PressureTimePerVolumeUnit& unit) const;
58 
59  virtual bool HasSealResistance() const;
60  virtual SEScalarPressureTimePerVolume& GetSealResistance();
61  virtual double GetSealResistance(const PressureTimePerVolumeUnit& unit) const;
62 
63  virtual bool HasFilterVolume() const;
64  virtual SEScalarVolume& GetFilterVolume();
65  virtual double GetFilterVolume(const VolumeUnit& unit) const;
66 
67  virtual bool HasConnectionVolume() const;
68  virtual SEScalarVolume& GetConnectionVolume();
69  virtual double GetConnectionVolume(const VolumeUnit& unit) const;
70 
71  virtual bool HasValveVolume() const;
72  virtual SEScalarVolume& GetValveVolume();
73  virtual double GetValveVolume(const VolumeUnit& unit) const;
74 
75  virtual bool HasValveResistance() const;
76  virtual SEScalarPressureTimePerVolume& GetValveResistance();
77  virtual double GetValveResistance(const PressureTimePerVolumeUnit& unit) const;
78 
79  virtual bool HasValvePositiveEndExpiredPressure() const;
80  virtual SEScalarPressure& GetValvePositiveEndExpiredPressure();
81  virtual double GetValvePositiveEndExpiredPressure(const PressureUnit& unit) const;
82 
83  bool HasFractionInspiredGas() const;
84  bool HasFractionInspiredGas(const SESubstance& substance) const;
85  const std::vector<SESubstanceFraction*>& GetFractionInspiredGases();
86  const std::vector<const SESubstanceFraction*>& GetFractionInspiredGases() const;
87  SESubstanceFraction& GetFractionInspiredGas(const SESubstance& substance);
88  const SESubstanceFraction* GetFractionInspiredGas(const SESubstance& substance) const;
89  void RemoveFractionInspiredGas(const SESubstance& substance);
90  void RemoveFractionInspiredGases();
91 
92  bool HasConcentrationInspiredAerosol() const;
93  bool HasConcentrationInspiredAerosol(const SESubstance& substance) const;
94  const std::vector<SESubstanceConcentration*>& GetConcentrationInspiredAerosols();
95  const std::vector<const SESubstanceConcentration*>& GetConcentrationInspiredAerosols() const;
96  SESubstanceConcentration& GetConcentrationInspiredAerosol(const SESubstance& substance);
97  const SESubstanceConcentration* GetConcentrationInspiredAerosol(const SESubstance& substance) const;
98  void RemoveConcentrationInspiredAerosol(const SESubstance& substance);
99  void RemoveConcentrationInspiredAerosols();
100 
101 protected:
104 
113 
114  std::vector<SESubstanceFraction*> m_FractionInspiredGases;
115  std::vector<const SESubstanceFraction*> m_cFractionInspiredGases;
116 
117  std::vector<SESubstanceConcentration*> m_ConcentrationInspiredAerosols;
118  std::vector<const SESubstanceConcentration*> m_cConcentrationInspiredAerosols;
119 };
Definition: SESubstanceManager.h:8
std::vector< SESubstanceConcentration * > m_ConcentrationInspiredAerosols
Definition: SEBagValveMask.h:117
Definition: SESubstanceFraction.h:9
Definition: SEScalar.h:18
Definition: SEScalarVolume.h:7
SEScalarEnum< eSwitch > m_Connection
Definition: SEBagValveMask.h:103
SEScalarPressureTimePerVolume * m_BagResistance
Definition: SEBagValveMask.h:105
Definition: SEScalarVolume.h:27
Definition: Logger.h:66
SEScalarPressure * m_ValvePositiveEndExpiredPressure
Definition: SEBagValveMask.h:111
Definition: SEScalarPressure.h:28
virtual void StateChange()
Definition: SEBagValveMask.h:37
friend SEBagValveMaskConfiguration
Definition: SEBagValveMask.h:17
static bool SerializeFromFile(const std::string &filename, SEBagValveMask &dst, const SESubstanceManager &subMgr)
Definition: PBBagValveMask.cpp:138
std::vector< SESubstanceFraction * > m_FractionInspiredGases
Definition: SEBagValveMask.h:114
Definition: SEBagValveMaskConfiguration.h:8
Definition: SEEventManager.h:64
Definition: SEBagValveMask.h:13
SEScalarPressureTimePerVolume * m_SealResistance
Definition: SEBagValveMask.h:107
static bool SerializeToFile(const SEBagValveMask &src, const std::string &filename)
Definition: PBBagValveMask.cpp:123
Definition: SEScalarPressure.h:7
virtual void Clear()
Definition: SEEquipment.cpp:17
SEScalarVolume * m_ValveVolume
Definition: SEBagValveMask.h:110
Definition: SESubstanceConcentration.h:10
Definition: SEScalarPressureTimePerVolume.h:7
std::vector< const SESubstanceFraction * > m_cFractionInspiredGases
Definition: SEBagValveMask.h:115
SEScalarVolume * m_FilterVolume
Definition: SEBagValveMask.h:108
static bool SerializeFromString(const std::string &src, SEBagValveMask &dst, eSerializationFormat m, const SESubstanceManager &subMgr)
Definition: PBBagValveMask.cpp:130
SEScalarPressureTimePerVolume * m_ValveResistance
Definition: SEBagValveMask.h:112
Definition: PBBagValveMask.h:8
std::vector< const SESubstanceConcentration * > m_cConcentrationInspiredAerosols
Definition: SEBagValveMask.h:118
SEScalarPressureTimePerVolume * m_FilterResistance
Definition: SEBagValveMask.h:106
Definition: SEEquipment.h:8
Definition: SESubstance.h:14
virtual const SEScalar * GetScalar(const std::string &name)=0
SEScalarVolume * m_ConnectionVolume
Definition: SEBagValveMask.h:109
Definition: SEScalarPressureTimePerVolume.h:28
static bool SerializeToString(const SEBagValveMask &src, std::string &output, eSerializationFormat m)
Definition: PBBagValveMask.cpp:117
SEScalarEnum< eBreathState > m_BreathState
Definition: SEBagValveMask.h:102

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.