SEHepaticSystem.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/cdm/system/SESystem.h>
15 #include <biogears/schema/biogears/BioGearsPhysiology.hxx>
16 
17 namespace biogears {
18 class SEScalarAmountPerTime;
19 class AmountPerTimeUnit;
20 class SEScalarMassPerTime;
21 class MassPerTimeUnit;
22 
23 class BIOGEARS_API SEHepaticSystem : public SESystem {
24 public:
25  SEHepaticSystem(Logger* logger);
26  ~SEHepaticSystem() override;
27 
28  static size_t TypeHash() { return reinterpret_cast<size_t>(&TypeHash); }
29  static constexpr char const * const TypeTag() { return "SEHepaticSystem"; }
30  const char* classname() const override { return TypeTag(); }
31  size_t hash_code() const override { return TypeHash(); }
32 
33  void Clear() override; // Deletes all members
34 
35  const SEScalar* GetScalar(const char* name) override;
36  const SEScalar* GetScalar(const std::string& name) override;
37 
38  bool Load(const CDM::HepaticSystemData& in);
39  CDM::HepaticSystemData* Unload() const override;
40 
41  Tree<const char*> GetPhysiologyRequestGraph() const override;
42 protected:
43  void Unload(CDM::HepaticSystemData& data) const;
44 
45 public:
46  bool HasKetoneProductionRate() const;
47  SEScalarAmountPerTime& GetKetoneProductionRate();
48  double GetKetoneProductionRate(const AmountPerTimeUnit& unit) const;
49 
50  bool HasHepaticGluconeogenesisRate() const;
51  SEScalarMassPerTime& GetHepaticGluconeogenesisRate();
52  double GetHepaticGluconeogenesisRate(const MassPerTimeUnit& unit) const;
53 
54 protected:
57 };
58 }
const char * classname() const override
Definition: SEHepaticSystem.h:30
Definition: SEScalarAmountPerTime.h:38
Definition: SEScalar.h:33
SEScalarAmountPerTime * m_KetoneProductionRate
Definition: SEHepaticSystem.h:55
Definition: SESystem.h:27
Class corresponding to the HepaticSystemData schema type.
Definition: Physiology.hxx:11658
Definition: Logger.h:75
Definition: SEScalarMassPerTime.h:18
SEScalarMassPerTime * m_HepaticGluconeogenesisRate
Definition: SEHepaticSystem.h:56
Definition: SEHepaticSystem.h:23
size_t hash_code() const override
Definition: SEHepaticSystem.h:31
Definition: SEScalarAmountPerTime.h:18
static constexpr char const *const TypeTag()
Definition: SEHepaticSystem.h:29
static size_t TypeHash()
Definition: SEHepaticSystem.h:28
Definition: SEScalarMassPerTime.h:40
Definition: SEElectricalCircuit.h:18