SEElectricalCompartmentLink.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/compartment/SECompartmentLink.h"
9
11{
12 friend class PBCompartment;//friend the serialization class
14protected:
16public:
18
19 void Clear() override;
20
21 const SEScalar* GetScalar(const std::string& name) override;
22
23 virtual bool HasCurrent() const;
24 virtual SEScalarElectricCurrent& GetCurrent();
25 virtual double GetCurrent(const ElectricCurrentUnit& unit) const;
26
27 virtual SEElectricalCompartment& GetSourceCompartment() { return m_SourceCmpt; }
28 virtual SEElectricalCompartment& GetTargetCompartment() { return m_TargetCmpt; }
29
30 virtual bool HasPath() { return m_Path != nullptr; }
31 virtual SEElectricalCircuitPath* GetPath() { return m_Path; }
32 virtual void RemovePath() { m_Path = nullptr; }
33 virtual void MapPath(SEElectricalCircuitPath& path) { Clear(); m_Path = &path; }
34
35protected:
40};
41
42#include "cdm/compartment/SECompartmentGraph.h"
43class SEElectricalCompartmentGraph : public SECompartmentGraph<SEElectricalCompartment, SEElectricalCompartmentLink>
44{
45public:
46 SEElectricalCompartmentGraph(const std::string& name, Logger* logger) : SECompartmentGraph(name, logger) {};
48};
Definition: SEScalarElectricCurrent.h:8
Definition: Logger.h:71
Definition: PBCompartment.h:28
Definition: SECompartmentGraph.h:11
Definition: SECompartmentManager.h:25
Definition: SEElectricalBlackBox.h:11
Definition: SEElectricalCircuitPath.h:9
Definition: SEElectricalCompartmentLink.h:44
SEElectricalCompartmentGraph(const std::string &name, Logger *logger)
Definition: SEElectricalCompartmentLink.h:46
virtual ~SEElectricalCompartmentGraph()
Definition: SEElectricalCompartmentLink.h:47
Definition: SEElectricalCompartment.h:12
Definition: SEScalarElectricCurrent.h:24
Definition: SEScalar.h:19

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.