INET Framework for OMNeT++/OMNEST
|
#include <EnergySinkBase.h>
Public Member Functions | |
virtual int | getNumEnergyGenerators () const override |
Returns the number of energy generators in the range [0, +infinity). More... | |
virtual const IEnergyGenerator * | getEnergyGenerator (int index) const override |
Returns the energy generator for the provided index. More... | |
virtual void | addEnergyGenerator (const IEnergyGenerator *energyGenerator) override |
Adds a new energy generator to the energy sink. More... | |
virtual void | removeEnergyGenerator (const IEnergyGenerator *energyGenerator) override |
Removes a previously added energy generator from this energy sink. More... | |
Public Member Functions inherited from inet::power::IEnergySink | |
virtual | ~IEnergySink () |
Protected Attributes | |
std::vector< const IEnergyGenerator * > | energyGenerators |
|
overridevirtual |
Adds a new energy generator to the energy sink.
The energyGenerator parameter must not be nullptr.
Implements inet::power::IEnergySink.
Reimplemented in inet::power::CcEnergySinkBase, inet::power::CcEnergyStorageBase, inet::power::EpEnergySinkBase, and inet::power::EpEnergyStorageBase.
Referenced by inet::power::CcEnergySinkBase::addEnergyGenerator(), and inet::power::EpEnergySinkBase::addEnergyGenerator().
|
overridevirtual |
Returns the energy generator for the provided index.
This functions throws an exception if the index is out of range, and it never returns nullptr.
Implements inet::power::IEnergySink.
|
inlineoverridevirtual |
Returns the number of energy generators in the range [0, +infinity).
Implements inet::power::IEnergySink.
|
overridevirtual |
Removes a previously added energy generator from this energy sink.
This functions throws an exception if the generator is not found.
Implements inet::power::IEnergySink.
Reimplemented in inet::power::CcEnergySinkBase, inet::power::CcEnergyStorageBase, inet::power::EpEnergySinkBase, and inet::power::EpEnergyStorageBase.
Referenced by inet::power::CcEnergySinkBase::removeEnergyGenerator(), and inet::power::EpEnergySinkBase::removeEnergyGenerator().
|
protected |