SESystem.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 <string>
15 #include <typeinfo>
16 
17 #include <biogears/cdm/CommonDataModel.h>
18 #include <biogears/container/Tree.h>
19 #include <biogears/exports.h>
20 
21 CDM_BIND_DECL(SystemData)
22 
23 namespace biogears {
24 class SESubstanceManager;
25 class SEScalar;
26 
27 class BIOGEARS_API SESystem : public Loggable {
28 public:
29  SESystem(Logger* logger);
30  virtual ~SESystem();
31 
32  virtual const char* classname() const = 0;
33  virtual size_t hash_code() const = 0;
34 
35  virtual void Clear(); // Deletes all members
36 
45  virtual const SEScalar* GetScalar(const char* name) = 0;
46  virtual const SEScalar* GetScalar(const std::string& name) = 0;
47 
51  static const SEScalar* GetScalar(const char* name, std::vector<SESystem*>* systems);
52  static const SEScalar* GetScalar(const std::string& name, std::vector<SESystem*>* systems);
53 
54  bool Load(const CDM::SystemData& in);
55  virtual CDM::SystemData* Unload() const = 0;
56 
57  virtual Tree<const char*> GetPhysiologyRequestGraph() const = 0;
58 
59 protected:
60  void Unload(CDM::SystemData& data) const;
61 
62  std::stringstream m_ss;
63 };
64 }
Definition: SEScalar.h:33
Definition: SESystem.h:27
Definition: Logger.h:27
Definition: Logger.h:75
Class corresponding to the SystemData schema type.
Definition: System.hxx:682
std::stringstream m_ss
Definition: SESystem.h:62
Definition: SEElectricalCircuit.h:18