<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
SESubstance.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
9 
10 // Keep enums in sync with appropriate schema/cdm/SubstanceEnums.proto file !!
11 enum class eSubstance_State { NullState = 0, Solid, Liquid, Gas, Molecular };
12 extern const std::string& eSubstance_State_Name(eSubstance_State m);
13 
14 class CDM_DECL SESubstance : public Loggable
15 {
16  friend class PBSubstance;//friend the serialization class
17  friend class SESubstanceManager;
18 protected:
19  SESubstance(const std::string& name, Logger* logger);
20 public:
21  virtual ~SESubstance();
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);
28  bool SerializeFromFile(const std::string& filename);
29 
30  virtual const SEScalar* GetScalar(const std::string& name);
31 
32  virtual std::string GetName() const;
33 
34  virtual eSubstance_State GetState() const;
35  virtual void SetState(eSubstance_State state);
36  virtual bool HasState() const;
37  virtual void InvalidateState();
38 
39  virtual bool HasDensity() const;
40  virtual SEScalarMassPerVolume& GetDensity();
41  virtual double GetDensity(const MassPerVolumeUnit& unit) const;
42 
43  virtual bool HasMolarMass() const;
44  virtual SEScalarMassPerAmount& GetMolarMass();
45  virtual double GetMolarMass(const MassPerAmountUnit& unit) const;
46 
47  virtual bool HasValence() const;
48  virtual SEScalar& GetValence();
49  virtual double GetValence() const;
50 
51  // Diffusion-ish
52  virtual bool HasMaximumDiffusionFlux() const;
53  virtual SEScalarMassPerAreaTime& GetMaximumDiffusionFlux();
54  virtual double GetMaximumDiffusionFlux(const MassPerAreaTimeUnit& unit) const;
55 
56  virtual bool HasMichaelisCoefficient() const;
57  virtual SEScalar& GetMichaelisCoefficient();
58  virtual double GetMichaelisCoefficient() const;
59 
60  // Liquid-ish
61  virtual bool HasAerosolization() const;
62  virtual SESubstanceAerosolization& GetAerosolization();
63  virtual const SESubstanceAerosolization* GetAerosolization() const;
64  virtual void RemoveAerosolization();
65 
66  virtual bool HasBloodConcentration() const;
67  virtual SEScalarMassPerVolume& GetBloodConcentration();
68  virtual double GetBloodConcentration(const MassPerVolumeUnit& unit) const;
69 
70  virtual bool HasMassInBody() const;
71  virtual SEScalarMass& GetMassInBody();
72  virtual double GetMassInBody(const MassUnit& unit) const;
73 
74  virtual bool HasMassInBlood() const;
75  virtual SEScalarMass& GetMassInBlood();
76  virtual double GetMassInBlood(const MassUnit& unit) const;
77 
78  virtual bool HasMassInTissue() const;
79  virtual SEScalarMass& GetMassInTissue();
80  virtual double GetMassInTissue(const MassUnit& unit) const;
81 
82  virtual bool HasPlasmaConcentration() const;
83  virtual SEScalarMassPerVolume& GetPlasmaConcentration();
84  virtual double GetPlasmaConcentration(const MassPerVolumeUnit& unit) const;
85 
86  virtual bool HasSystemicMassCleared() const;
87  virtual SEScalarMass& GetSystemicMassCleared();
88  virtual double GetSystemicMassCleared(const MassUnit& unit) const;
89 
90  virtual bool HasTissueConcentration() const;
91  virtual SEScalarMassPerVolume& GetTissueConcentration();
92  virtual double GetTissueConcentration(const MassPerVolumeUnit& unit) const;
93 
94  // Gas-ish
95  virtual bool HasAlveolarTransfer() const;
96  virtual SEScalarVolumePerTime& GetAlveolarTransfer();
97  virtual double GetAlveolarTransfer(const VolumePerTimeUnit& unit) const;
98 
99  virtual bool HasDiffusingCapacity() const;
100  virtual SEScalarVolumePerTimePressure& GetDiffusingCapacity();
101  virtual double GetDiffusingCapacity(const VolumePerTimePressureUnit& unit) const;
102 
103  virtual bool HasEndTidalFraction() const;
104  virtual SEScalar0To1& GetEndTidalFraction();
105  virtual double GetEndTidalFraction() const;
106 
107  virtual bool HasEndTidalPressure() const;
108  virtual SEScalarPressure& GetEndTidalPressure();
109  virtual double GetEndTidalPressure(const PressureUnit& unit) const;
110 
111  virtual bool HasRelativeDiffusionCoefficient() const;
112  virtual SEScalar& GetRelativeDiffusionCoefficient();
113  virtual double GetRelativeDiffusionCoefficient() const;
114 
115  virtual bool HasSolubilityCoefficient() const;
116  virtual SEScalarInversePressure& GetSolubilityCoefficient();
117  virtual double GetSolubilityCoefficient(const InversePressureUnit& unit) const;
118 
119  virtual bool HasClearance() const;
120  virtual SESubstanceClearance& GetClearance();
121  virtual const SESubstanceClearance* GetClearance() const;
122  virtual void RemoveClearance();
123 
124  virtual bool HasPK() const;
125  virtual SESubstancePharmacokinetics& GetPK();
126  virtual const SESubstancePharmacokinetics* GetPK() const;
127  virtual void RemovePK();
128 
129  virtual bool HasPD() const;
130  virtual SESubstancePharmacodynamics& GetPD();
131  virtual const SESubstancePharmacodynamics* GetPD() const;
132  virtual void RemovePD();
133 
134 
135 protected:
136 
137  std::string m_Name;
138  eSubstance_State m_State;
142 
145 
154 
161 
165 };
SEScalarVolumePerTime * m_AlveolarTransfer
Definition: SESubstance.h:155
Definition: SESubstanceManager.h:8
SEScalarMass * m_MassInBody
Definition: SESubstance.h:148
Definition: SEScalarMass.h:27
Definition: SEScalarVolumePerTimePressure.h:7
Definition: SEScalar.h:18
SEScalarMassPerAreaTime * m_MaximumDiffusionFlux
Definition: SESubstance.h:143
Definition: Logger.h:66
Definition: SESubstancePharmacokinetics.h:8
Definition: SEScalarMassPerVolume.h:36
std::string m_Name
Definition: SESubstance.h:137
Definition: SEScalarPressure.h:28
Definition: SEScalarMassPerVolume.h:7
SEScalarMassPerVolume * m_Density
Definition: SESubstance.h:139
SEScalarMassPerVolume * m_BloodConcentration
Definition: SESubstance.h:147
SEScalarPressure * m_EndTidalPressure
Definition: SESubstance.h:158
SEScalarMass * m_MassInTissue
Definition: SESubstance.h:150
Definition: SEScalarMassPerAmount.h:7
Definition: SEScalarVolumePerTimePressure.h:26
Definition: SEScalarVolumePerTime.h:7
Definition: SEScalarMassPerAreaTime.h:23
Definition: Logger.h:18
SESubstancePharmacokinetics * m_PK
Definition: SESubstance.h:163
Definition: SEScalarPressure.h:7
virtual void Clear()
Definition: SESubstanceManager.cpp:23
SESubstanceClearance * m_Clearance
Definition: SESubstance.h:162
SEScalarMass * m_MassInBlood
Definition: SESubstance.h:149
SESubstanceAerosolization * m_Aerosolization
Definition: SESubstance.h:146
Definition: SEScalarVolumePerTime.h:30
SESubstancePharmacodynamics * m_PD
Definition: SESubstance.h:164
SEScalarMass * m_SystemicMassCleared
Definition: SESubstance.h:152
Definition: SEScalarInversePressure.h:26
SEScalarMassPerVolume * m_PlasmaConcentration
Definition: SESubstance.h:151
SEScalarMassPerAmount * m_MolarMass
Definition: SESubstance.h:140
Definition: SEScalarInversePressure.h:7
SEScalarInversePressure * m_SolubilityCoefficient
Definition: SESubstance.h:160
Definition: SESubstanceAerosolization.h:6
Definition: SEScalarMassPerAmount.h:33
SEScalar * m_RelativeDiffusionCoefficient
Definition: SESubstance.h:159
SEScalar0To1 * m_EndTidalFraction
Definition: SESubstance.h:157
eSubstance_State m_State
Definition: SESubstance.h:138
Definition: PBSubstance.h:18
SEScalarMassPerVolume * m_TissueConcentration
Definition: SESubstance.h:153
Definition: SEScalarMass.h:7
Definition: SESubstanceClearance.h:8
SEScalar * m_Valence
Definition: SESubstance.h:141
Definition: SESubstance.h:14
Definition: SESubstancePharmacodynamics.h:7
Definition: SEScalar0To1.h:7
SEScalar * m_MichaelisCoefficient
Definition: SESubstance.h:144
SEScalarVolumePerTimePressure * m_DiffusingCapacity
Definition: SESubstance.h:156
Definition: SEScalarMassPerAreaTime.h:7

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.