SEGasSubstanceQuantity.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 #include "compartment/substances/SESubstanceQuantity.h"
6 #include "substance/SESubstanceTransport.h"
7 class SEGasCompartment;
8 
10 {
11  friend class PBSubstanceQuantity;//friend the serialization class
12  friend class SEGasCompartment;
13 protected:
15 public:
16  virtual ~SEGasSubstanceQuantity();
17 
18  virtual void Clear();
19  virtual void Invalidate();
20 
21  virtual void SetToZero();
22  virtual const SEScalar* GetScalar(const std::string& name);
23 
24  virtual bool HasPartialPressure() const;
25  virtual SEScalarPressure& GetPartialPressure();
26  virtual double GetPartialPressure(const PressureUnit& unit) const;
27 
28  virtual bool HasVolume() const;
29  virtual SEScalarVolume& GetVolume();
30  virtual double GetVolume(const VolumeUnit& unit) const;
31 
32  virtual bool HasVolumeFraction() const;
33  virtual SEScalar0To1& GetVolumeFraction();
34  virtual double GetVolumeFraction() const;
35 
36 protected:
37  virtual void AddChild(SEGasSubstanceQuantity& subQ);
38 
39  virtual bool HasExtensive() const { return HasVolume(); }
40  virtual SEScalarVolume& GetExtensive() { return GetVolume(); }
41 
42  virtual bool HasIntensive() const { return HasVolumeFraction(); }
43  virtual SEScalar0To1& GetIntensive() { return GetVolumeFraction(); }
44 
48 
50  std::vector<SEGasSubstanceQuantity*> m_Children;
51 };
Definition: SESubstanceTransport.h:13
virtual SEScalar0To1 & GetIntensive()
Definition: SEGasSubstanceQuantity.h:43
Definition: SEScalar.h:19
Definition: SEScalarVolume.h:7
Definition: SEGasCompartment.h:12
Definition: SEScalarVolume.h:23
Definition: SEScalarPressure.h:23
virtual bool HasExtensive() const
Definition: SEGasSubstanceQuantity.h:39
Definition: SEScalarPressure.h:7
virtual SEScalarVolume & GetExtensive()
Definition: SEGasSubstanceQuantity.h:40
virtual void SetToZero()=0
SEGasCompartment & m_Compartment
Definition: SEGasSubstanceQuantity.h:49
std::vector< SEGasSubstanceQuantity * > m_Children
Definition: SEGasSubstanceQuantity.h:50
SEScalarVolume * m_Volume
Definition: SEGasSubstanceQuantity.h:46
Definition: PBSubstanceQuantity.h:10
virtual bool HasIntensive() const
Definition: SEGasSubstanceQuantity.h:42
virtual void Invalidate()=0
virtual void AddChild(SEGasCompartment &child)
Definition: SEGasCompartment.cpp:104
Definition: SEGasSubstanceQuantity.h:9
Definition: SESubstance.h:14
Definition: SEScalar0To1.h:7
SEScalar0To1 * m_VolumeFraction
Definition: SEGasSubstanceQuantity.h:47
Definition: SESubstanceQuantity.h:7
SEScalarPressure * m_PartialPressure
Definition: SEGasSubstanceQuantity.h:45