SESubstanceQuantity.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/substance/SESubstance.h>
15 #include <biogears/schema/cdm/SubstanceQuantity.hxx>
16 
17 namespace biogears {
18 class BIOGEARS_API SESubstanceQuantity : public Loggable {
19 public:
21  : Loggable(sub.GetLogger())
22  , m_Substance(sub){};
23 
24  virtual ~SESubstanceQuantity() override = default;
25 
26  virtual void Clear() = 0; //clear memory
27  virtual void Invalidate() = 0;
28 
29  virtual bool Load(const CDM::SubstanceQuantityData& in);
30  virtual CDM::SubstanceQuantityData* Unload() = 0;
31 
32 protected:
33  virtual void Unload(CDM::SubstanceQuantityData& data);
34 
35 public:
36  virtual SESubstance& GetSubstance() const { return m_Substance; }
37 
38  virtual const SEScalar* GetScalar(const char* name) = 0;
39  virtual const SEScalar* GetScalar(const std::string& name) = 0;
40 
41 protected:
43 };
44 }
Definition: SEScalar.h:33
SESubstance & m_Substance
Definition: SESubstanceQuantity.h:42
SESubstanceQuantity(SESubstance &sub)
Definition: SESubstanceQuantity.h:20
Definition: Logger.h:27
Definition: SESubstance.h:49
Definition: SESubstanceQuantity.h:18
Class corresponding to the SubstanceQuantityData schema type.
Definition: SubstanceQuantity.hxx:685
virtual SESubstance & GetSubstance() const
Definition: SESubstanceQuantity.h:36
Definition: SEElectricalCircuit.h:18