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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.