SEGasCompartmentGraph.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/cdm/compartment/SECompartmentTransportGraph.h>
16 #include <biogears/cdm/compartment/fluid/SEGasCompartment.h>
17 #include <biogears/cdm/compartment/fluid/SEGasCompartmentLink.h>
18 #include <biogears/schema/cdm/Compartment.hxx>
19 
20 CDM_BIND_DECL(GasCompartmentGraphData)
21 
22 namespace biogears {
23 class SECompartmentManager;
24 
25 class BIOGEARS_API SEGasCompartmentGraph : public SECompartmentTransportGraph<SEGasTransportGraph, SEGasTransportVertex, SEGasTransportEdge, SEGasCompartment, SEGasCompartmentLink> {
26  friend class SECompartmentManager;
27 
28 protected:
29  SEGasCompartmentGraph(const char* name, Logger* logger);
30  SEGasCompartmentGraph(const std::string& name, Logger* logger);
31 
32 public:
33  virtual ~SEGasCompartmentGraph() = default;
34 
35  void AddGraph(SEGasCompartmentGraph& graph);
36 
37  virtual bool Load(const CDM::GasCompartmentGraphData& in, SECompartmentManager& cmptMgr);
38  virtual CDM::GasCompartmentGraphData* Unload();
39 
40 protected:
41  virtual void Unload(CDM::GasCompartmentGraphData& data);
42 
43 protected:
44  void BalanceByIntensive() override;
45 };
46 }
Class corresponding to the GasCompartmentGraphData schema type.
Definition: Compartment.hxx:2790
Definition: SECompartmentManager.h:32
Definition: Logger.h:75
Definition: SECompartmentTransportGraph.h:24
Definition: SEGasCompartmentGraph.h:25
virtual void BalanceByIntensive() override=0
Definition: SEElectricalCircuit.h:18