SESubstanceFraction.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/CommonDataModel.h>
15 #include <biogears/exports.h>
16 
17 CDM_BIND_DECL(SubstanceFractionData)
18 
19 namespace biogears {
20 class SESubstance;
21 class SESubstanceManager;
22 class SEEnvironmentalConditions;
23 class SEScalarFraction;
24 
25 class BIOGEARS_API SESubstanceFraction : public Loggable {
26 protected:
27  friend SEEnvironmentalConditions; // So it can add substances to the manager
28 public:
30  virtual ~SESubstanceFraction();
31 
32  virtual void Clear();
33 
34  virtual bool Load(const CDM::SubstanceFractionData& in);
35  virtual CDM::SubstanceFractionData* Unload() const;
36 
37 protected:
38  virtual void Unload(CDM::SubstanceFractionData& data) const;
39 
40 public:
41  virtual bool HasFractionAmount() const;
42  virtual SEScalarFraction& GetFractionAmount();
43  virtual double GetFractionAmount() const;
44 
45  virtual SESubstance& GetSubstance() const;
46 
47 protected:
50 };
51 }
friend SEEnvironmentalConditions
Definition: SESubstanceFraction.h:27
Definition: Logger.h:27
Definition: SEScalarFraction.h:18
Definition: SESubstance.h:49
SEScalarFraction * m_FractionAmount
Definition: SESubstanceFraction.h:49
Definition: SESubstanceFraction.h:25
Class corresponding to the SubstanceFractionData schema type.
Definition: Substance.hxx:6982
SESubstance & m_Substance
Definition: SESubstanceFraction.h:48
Definition: SEElectricalCircuit.h:18