<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
SERespiratoryMechanics.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
6 
7 class CDM_DECL SERespiratoryMechanics : public Loggable
8 {
9  friend class PBPhysiology;
10 public:
11 
13  virtual ~SERespiratoryMechanics();
14 
15  virtual void Clear();// Deletes all members
16 
17  bool SerializeToString(std::string& output, eSerializationFormat m) const;
18  bool SerializeToFile(const std::string& filename) const;
19  bool SerializeFromString(const std::string& src, eSerializationFormat m);
20  bool SerializeFromFile(const std::string& filename);
21 
22  virtual void Merge(const SERespiratoryMechanics& from);
23  virtual void ProcessConfiguration(SERespiratoryMechanicsConfiguration& config);
24 
25 
26  virtual bool HasActive() const;
27  virtual eSwitch GetActive() const;
28  virtual void SetActive(eSwitch s);
29 
30  bool HasLeftComplianceCurve() const;
31  SECurve& GetLeftComplianceCurve();
32  const SECurve* GetLeftComplianceCurve() const;
33 
34  bool HasRightComplianceCurve() const;
35  SECurve& GetRightComplianceCurve();
36  const SECurve* GetRightComplianceCurve() const;
37 
46  virtual const SEScalar* GetScalar(const std::string& name);
47 
48  virtual bool HasLeftExpiratoryResistance() const;
49  virtual SEScalarPressureTimePerVolume& GetLeftExpiratoryResistance();
50  virtual double GetLeftExpiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
51 
52  virtual bool HasLeftInspiratoryResistance() const;
53  virtual SEScalarPressureTimePerVolume& GetLeftInspiratoryResistance();
54  virtual double GetLeftInspiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
55 
56  virtual bool HasRightExpiratoryResistance() const;
57  virtual SEScalarPressureTimePerVolume& GetRightExpiratoryResistance();
58  virtual double GetRightExpiratoryResistance(const PressureTimePerVolumeUnit& unit) const;;
59 
60  virtual bool HasRightInspiratoryResistance() const;
61  virtual SEScalarPressureTimePerVolume& GetRightInspiratoryResistance();
62  virtual double GetRightInspiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
63 
64  virtual bool HasUpperExpiratoryResistance() const;
65  virtual SEScalarPressureTimePerVolume& GetUpperExpiratoryResistance();
66  virtual double GetUpperExpiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
67 
68  virtual bool HasUpperInspiratoryResistance() const;
69  virtual SEScalarPressureTimePerVolume& GetUpperInspiratoryResistance();
70  virtual double GetUpperInspiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
71 
72  virtual bool HasInspiratoryPeakPressure() const;
73  virtual SEScalarPressure& GetInspiratoryPeakPressure();
74  virtual double GetInspiratoryPeakPressure(const PressureUnit& unit) const;
75 
76  virtual bool HasExpiratoryPeakPressure() const;
77  virtual SEScalarPressure& GetExpiratoryPeakPressure();
78  virtual double GetExpiratoryPeakPressure(const PressureUnit& unit) const;
79 
80  virtual bool HasInspiratoryRiseTime() const;
81  virtual SEScalarTime& GetInspiratoryRiseTime();
82  virtual double GetInspiratoryRiseTime(const TimeUnit& unit) const;
83 
84  virtual bool HasInspiratoryHoldTime() const;
85  virtual SEScalarTime& GetInspiratoryHoldTime();
86  virtual double GetInspiratoryHoldTime(const TimeUnit& unit) const;
87 
88  virtual bool HasInspiratoryReleaseTime() const;
89  virtual SEScalarTime& GetInspiratoryReleaseTime();
90  virtual double GetInspiratoryReleaseTime(const TimeUnit& unit) const;
91 
92  virtual bool HasInspiratoryToExpiratoryPauseTime() const;
93  virtual SEScalarTime& GetInspiratoryToExpiratoryPauseTime();
94  virtual double GetInspiratoryToExpiratoryPauseTime(const TimeUnit& unit) const;
95 
96  virtual bool HasExpiratoryRiseTime() const;
97  virtual SEScalarTime& GetExpiratoryRiseTime();
98  virtual double GetExpiratoryRiseTime(const TimeUnit& unit) const;
99 
100  virtual bool HasExpiratoryHoldTime() const;
101  virtual SEScalarTime& GetExpiratoryHoldTime();
102  virtual double GetExpiratoryHoldTime(const TimeUnit& unit) const;
103 
104  virtual bool HasExpiratoryReleaseTime() const;
105  virtual SEScalarTime& GetExpiratoryReleaseTime();
106  virtual double GetExpiratoryReleaseTime(const TimeUnit& unit) const;
107 
108  virtual bool HasResidueTime() const;
109  virtual SEScalarTime& GetResidueTime();
110  virtual double GetResidueTime(const TimeUnit& unit) const;
111 
112  virtual std::string ToString() const;
113  virtual void ToString(std::ostream& str) const;
114 
115 protected:
116  eSwitch m_Active;
117 
120 
137 };
138 
139 inline std::ostream& operator<< (std::ostream& out, const SERespiratoryMechanics* s)
140 {
141  if (s == nullptr)
142  out << "Null Respiratory Mechanics" << std::flush;
143  else
144  (*s).ToString(out);
145  return out;
146 }
147 inline std::ostream& operator<< (std::ostream& out, const SERespiratoryMechanics& s)
148 {
149  s.ToString(out);
150  return out;
151 }
SEScalarTime * m_ExpiratoryHoldTime
Definition: SERespiratoryMechanics.h:134
Definition: SEScalar.h:18
SECurve * m_RightComplianceCurve
Definition: SERespiratoryMechanics.h:119
SEScalarPressureTimePerVolume * m_UpperExpiratoryResistance
Definition: SERespiratoryMechanics.h:125
SEScalarPressureTimePerVolume * m_LeftInspiratoryResistance
Definition: SERespiratoryMechanics.h:122
Definition: Logger.h:66
SEScalarPressureTimePerVolume * m_RightInspiratoryResistance
Definition: SERespiratoryMechanics.h:124
Definition: SEScalarPressure.h:28
SEScalarPressure * m_ExpiratoryPeakPressure
Definition: SERespiratoryMechanics.h:128
SEScalarTime * m_InspiratoryReleaseTime
Definition: SERespiratoryMechanics.h:131
SEScalarTime * m_InspiratoryRiseTime
Definition: SERespiratoryMechanics.h:129
Definition: SEScalarTime.h:7
Definition: Logger.h:18
Definition: SERespiratoryMechanics.h:7
SEScalarTime * m_InspiratoryToExpiratoryPauseTime
Definition: SERespiratoryMechanics.h:132
Definition: SECurve.h:11
Definition: SEScalarPressure.h:7
static bool SerializeToString(const SERespiratoryMechanics &src, std::string &output, eSerializationFormat m)
Definition: PBPhysiology.cpp:933
SEScalarTime * m_ExpiratoryRiseTime
Definition: SERespiratoryMechanics.h:133
static bool SerializeFromString(const std::string &src, SERespiratoryMechanics &dst, eSerializationFormat m)
Definition: PBPhysiology.cpp:946
SEScalarPressureTimePerVolume * m_UpperInspiratoryResistance
Definition: SERespiratoryMechanics.h:126
SECurve * m_LeftComplianceCurve
Definition: SERespiratoryMechanics.h:118
Definition: SEScalarPressureTimePerVolume.h:7
static bool SerializeToFile(const SERespiratoryMechanics &src, const std::string &filename)
Definition: PBPhysiology.cpp:939
eSwitch m_Active
Definition: SERespiratoryMechanics.h:116
SEScalarPressureTimePerVolume * m_LeftExpiratoryResistance
Definition: SERespiratoryMechanics.h:121
Definition: SERespiratoryMechanicsConfiguration.h:8
SEScalarTime * m_ExpiratoryReleaseTime
Definition: SERespiratoryMechanics.h:135
Definition: SEScalarTime.h:27
static bool SerializeFromFile(const std::string &filename, SERespiratoryMechanics &dst)
Definition: PBPhysiology.cpp:954
virtual std::string ToString() const
Definition: SERespiratoryMechanics.cpp:500
SEScalarTime * m_InspiratoryHoldTime
Definition: SERespiratoryMechanics.h:130
Definition: PBPhysiology.h:21
SEScalarPressure * m_InspiratoryPeakPressure
Definition: SERespiratoryMechanics.h:127
SEScalarTime * m_ResidueTime
Definition: SERespiratoryMechanics.h:136
SEScalarPressureTimePerVolume * m_RightExpiratoryResistance
Definition: SERespiratoryMechanics.h:123
Definition: SEScalarPressureTimePerVolume.h:28
virtual std::string ToString() const
Definition: SEScalar.cpp:534

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.