SEEndocrineSystem.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 SEScalarFraction;
19 class SEScalarMass;
20 class MassUnit;
21 class SEScalarTemperature;
22 class TemperatureUnit;
23 class SEScalarAmountPerTime;
24 class AmountPerTimeUnit;
25 class SEScalarPressure;
26 class PressureUnit;
27 class SEScalarMassPerTime;
28 class MassPerTimeUnit;
29 class SEScalarPower;
30 class PowerUnit;
31 
32 class BIOGEARS_API SEEndocrineSystem : public SESystem {
33 public:
34  SEEndocrineSystem(Logger* logger);
35  ~SEEndocrineSystem() override;
36 
37  static size_t TypeHash() { return reinterpret_cast<size_t>(&TypeHash); }
38  static constexpr char const * const TypeTag() { return "SEEndocrineSystem"; }
39  const char* classname() const override { return TypeTag(); }
40  size_t hash_code() const override { return TypeHash(); }
41 
42  void Clear() override; // Deletes all members
43 
44  const SEScalar* GetScalar(const char* name) override;
45  const SEScalar* GetScalar(const std::string& name) override;
46 
47  bool Load(const CDM::EndocrineSystemData& in);
48  CDM::EndocrineSystemData* Unload() const override;
49 
50  Tree<const char*> GetPhysiologyRequestGraph() const override;
51 protected:
52  void Unload(CDM::EndocrineSystemData& data) const;
53 
54 public:
55  bool HasInsulinSynthesisRate() const;
56  SEScalarAmountPerTime& GetInsulinSynthesisRate();
57  double GetInsulinSynthesisRate(const AmountPerTimeUnit& unit) const;
58 
59  bool HasGlucagonSynthesisRate() const;
60  SEScalarAmountPerTime& GetGlucagonSynthesisRate();
61  double GetGlucagonSynthesisRate(const AmountPerTimeUnit& unit) const;
62 
63 protected:
66 };
67 }
Definition: SEEndocrineSystem.h:32
Definition: SEScalarAmountPerTime.h:38
Definition: SEScalar.h:33
SEScalarAmountPerTime * m_GlucagonSynthesisRate
Definition: SEEndocrineSystem.h:65
Definition: SESystem.h:27
static constexpr char const *const TypeTag()
Definition: SEEndocrineSystem.h:38
Definition: Logger.h:75
size_t hash_code() const override
Definition: SEEndocrineSystem.h:40
SEScalarAmountPerTime * m_InsulinSynthesisRate
Definition: SEEndocrineSystem.h:64
static size_t TypeHash()
Definition: SEEndocrineSystem.h:37
Definition: SEScalarAmountPerTime.h:18
const char * classname() const override
Definition: SEEndocrineSystem.h:39
Definition: SEElectricalCircuit.h:18
Class corresponding to the EndocrineSystemData schema type.
Definition: Physiology.hxx:9364