SEElectricalBlackBox.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/SEBlackBox.h"
6#include "cdm/circuit/electrical/SEElectricalCircuitPath.h"
7#include "cdm/compartment/electrical/SEElectricalCompartment.h"
8#include "cdm/compartment/electrical/SEElectricalCompartmentLink.h"
9
10class CDM_DECL SEElectricalBlackBox : public SEBlackBox<ELECTRICAL_BLACK_BOX>
11{
12 friend class SEBlackBoxManager;
13 friend class CommonDataModelTest;
14protected:
15 SEElectricalBlackBox(const std::string& name, Logger* logger);
16public:
17 virtual ~SEElectricalBlackBox();
18
19protected:
20 // Graph Elements
21 virtual bool HasCompartment() const { return m_Compartment != nullptr; }
22 virtual SEElectricalCompartment* GetCompartment() const { return m_Compartment; }
23 virtual void SetCompartment(SEElectricalCompartment* c) { m_Compartment = c; }
24
25 virtual bool HasSourceCompartment() const { return m_srcCompartment != nullptr; }
26 virtual SEElectricalCompartment* GetSourceCompartment() const { return m_srcCompartment; }
27 virtual void SetSourceCompartment(SEElectricalCompartment* c) { m_srcCompartment = c; }
28
29 virtual bool HasTargetCompartment() const { return m_tgtCompartment != nullptr; }
30 virtual SEElectricalCompartment* GetTargetCompartment() const { return m_tgtCompartment; }
31 virtual void SetTargetCompartment(SEElectricalCompartment* c) { m_tgtCompartment = c; }
32
33 virtual bool HasSourceLink() const { return m_srcLink != nullptr; }
34 virtual SEElectricalCompartmentLink* GetSourceLink() const { return m_srcLink; }
35 virtual void SetSourceLink(SEElectricalCompartmentLink* l) { m_srcLink = l; }
36
37 virtual bool HasTargetLink() const { return m_tgtLink != nullptr; }
38 virtual SEElectricalCompartmentLink* GetTargetLink() const { return m_tgtLink; }
39 virtual void SetTargetLink(SEElectricalCompartmentLink* l) { m_tgtLink = l; }
40
41protected:
42 // Graph Elements
43 SEElectricalCompartment* m_Compartment = nullptr;
44 SEElectricalCompartment* m_srcCompartment = nullptr;
45 SEElectricalCompartment* m_tgtCompartment = nullptr;
46 SEElectricalCompartmentLink* m_srcLink = nullptr;
47 SEElectricalCompartmentLink* m_tgtLink = nullptr;
48};
Definition: CommonDataModelTest.h:26
Definition: Logger.h:71
Definition: SEBlackBox.h:42
Definition: SEBlackBoxManager.h:11
Definition: SEElectricalBlackBox.h:11
virtual SEElectricalCompartment * GetSourceCompartment() const
Definition: SEElectricalBlackBox.h:26
virtual bool HasSourceCompartment() const
Definition: SEElectricalBlackBox.h:25
virtual void SetSourceCompartment(SEElectricalCompartment *c)
Definition: SEElectricalBlackBox.h:27
virtual SEElectricalCompartment * GetTargetCompartment() const
Definition: SEElectricalBlackBox.h:30
virtual SEElectricalCompartmentLink * GetSourceLink() const
Definition: SEElectricalBlackBox.h:34
virtual bool HasCompartment() const
Definition: SEElectricalBlackBox.h:21
virtual void SetTargetCompartment(SEElectricalCompartment *c)
Definition: SEElectricalBlackBox.h:31
virtual SEElectricalCompartmentLink * GetTargetLink() const
Definition: SEElectricalBlackBox.h:38
virtual void SetTargetLink(SEElectricalCompartmentLink *l)
Definition: SEElectricalBlackBox.h:39
virtual void SetCompartment(SEElectricalCompartment *c)
Definition: SEElectricalBlackBox.h:23
virtual bool HasTargetCompartment() const
Definition: SEElectricalBlackBox.h:29
virtual bool HasTargetLink() const
Definition: SEElectricalBlackBox.h:37
virtual SEElectricalCompartment * GetCompartment() const
Definition: SEElectricalBlackBox.h:22
virtual void SetSourceLink(SEElectricalCompartmentLink *l)
Definition: SEElectricalBlackBox.h:35
virtual bool HasSourceLink() const
Definition: SEElectricalBlackBox.h:33
Definition: SEElectricalCompartment.h:12

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.