SEGasBlackBox.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/blackbox/fluid/SEFluidBlackBox.h"
6//#include "cdm/blackbox/substances/SEGasBlackBoxSubstanceQuantity.h"
7#include "cdm/compartment/fluid/SEGasCompartment.h"
8#include "cdm/compartment/fluid/SEGasCompartmentLink.h"
9
10class CDM_DECL SEGasBlackBox : public SEFluidBlackBox
11{
12 friend class SEBlackBoxManager;
13protected:
14 SEGasBlackBox(const std::string& name, Logger* logger);
15public:
16 virtual ~SEGasBlackBox();
17
18 virtual void Clear(); //clear memory
19
20 // Graph Elements
21 virtual bool HasCompartment() const { return m_Compartment != nullptr; }
22 virtual SEGasCompartment& GetCompartment() { return *m_Compartment; }
23 virtual const SEGasCompartment& GetCompartment() const { return *m_Compartment; }
24
25 virtual bool HasSourceCompartment() const { return m_srcCompartment != nullptr; }
26 virtual SEGasCompartment& GetSourceCompartment() { return *m_srcCompartment; }
27 virtual const SEGasCompartment& GetSourceCompartment() const { return *m_srcCompartment; }
28
29 virtual bool HasTargetCompartment() const { return m_tgtCompartment != nullptr; }
30 virtual SEGasCompartment& GetTargetCompartment() { return *m_tgtCompartment; }
31 virtual const SEGasCompartment& GetTargetCompartment() const { return *m_tgtCompartment; }
32
33 virtual bool HasSourceLink() const { return m_srcLink != nullptr; }
34 virtual SEGasCompartmentLink& GetSourceLink() { return *m_srcLink; }
35 virtual const SEGasCompartmentLink& GetSourceLink() const { return *m_srcLink; }
36
37 virtual bool HasTargetLink() const { return m_tgtLink != nullptr; }
38 virtual SEGasCompartmentLink& GetTargetLink() { return *m_tgtLink; }
39 virtual const SEGasCompartmentLink& GetTargetLink() const { return *m_tgtLink; }
40
41protected:
42 virtual void SetCompartment(SEGasCompartment* c) { m_Compartment = c; }
43 virtual void SetSourceCompartment(SEGasCompartment* c) { m_srcCompartment = c; }
44 virtual void SetTargetCompartment(SEGasCompartment* c) { m_tgtCompartment = c; }
45 virtual void SetSourceLink(SEGasCompartmentLink* l) { m_srcLink = l; }
46 virtual void SetTargetLink(SEGasCompartmentLink* l) { m_tgtLink = l; }
47
48 // Graph Elements
49 SEGasCompartment* m_Compartment = nullptr;
50 SEGasCompartment* m_srcCompartment = nullptr;
51 SEGasCompartment* m_tgtCompartment = nullptr;
52 SEGasCompartmentLink* m_srcLink = nullptr;
53 SEGasCompartmentLink* m_tgtLink = nullptr;
54};
Definition: Logger.h:71
virtual void Clear()
Definition: SEBlackBox.h:51
Definition: SEBlackBoxManager.h:11
Definition: SEFluidBlackBox.h:9
Definition: SEGasBlackBox.h:11
virtual void SetSourceCompartment(SEGasCompartment *c)
Definition: SEGasBlackBox.h:43
virtual const SEGasCompartmentLink & GetTargetLink() const
Definition: SEGasBlackBox.h:39
virtual void SetTargetLink(SEGasCompartmentLink *l)
Definition: SEGasBlackBox.h:46
virtual void SetTargetCompartment(SEGasCompartment *c)
Definition: SEGasBlackBox.h:44
virtual bool HasCompartment() const
Definition: SEGasBlackBox.h:21
virtual const SEGasCompartment & GetSourceCompartment() const
Definition: SEGasBlackBox.h:27
virtual SEGasCompartment & GetTargetCompartment()
Definition: SEGasBlackBox.h:30
virtual bool HasSourceCompartment() const
Definition: SEGasBlackBox.h:25
virtual void SetSourceLink(SEGasCompartmentLink *l)
Definition: SEGasBlackBox.h:45
virtual const SEGasCompartmentLink & GetSourceLink() const
Definition: SEGasBlackBox.h:35
virtual const SEGasCompartment & GetTargetCompartment() const
Definition: SEGasBlackBox.h:31
virtual SEGasCompartment & GetCompartment()
Definition: SEGasBlackBox.h:22
virtual SEGasCompartment & GetSourceCompartment()
Definition: SEGasBlackBox.h:26
virtual SEGasCompartmentLink & GetSourceLink()
Definition: SEGasBlackBox.h:34
virtual bool HasTargetCompartment() const
Definition: SEGasBlackBox.h:29
virtual void SetCompartment(SEGasCompartment *c)
Definition: SEGasBlackBox.h:42
virtual bool HasSourceLink() const
Definition: SEGasBlackBox.h:33
virtual const SEGasCompartment & GetCompartment() const
Definition: SEGasBlackBox.h:23
virtual SEGasCompartmentLink & GetTargetLink()
Definition: SEGasBlackBox.h:38
virtual bool HasTargetLink() const
Definition: SEGasBlackBox.h:37
Definition: SEGasCompartment.h:14

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.