Fw/DataStructures/docs/SetOrMapImplEntry.md
SetOrMapImplEntry is a final class template
defined in Fw/DataStructures.
It represents an iterator for a set or a map implementation.
SetOrMapImplEntry has the following template parameters.
| Kind | Name | Purpose |
|---|---|---|
typename | KE | The type of a key in a map or the element of a set |
typename | VN | The type of a value in a map or Nil in a set |
SetOrMapImplEntry statically asserts the following:
KE is default constructible.KE is assignable to KE&.VN is default constructible.VN is assignable to VN&.SetOrMapImplEntry<KE, VN> is publicly derived from the following
templates:
classDiagram
MapEntryBase <|-- SetOrMapImplEntry
SetOrMapImplEntry has the following private member variables.
| Name | Type | Purpose | Default Value |
|---|---|---|---|
m_keyOrElement | KE | The map key or set element | C++ default initialization |
m_valueOrNil | VN | The value or Nil | C++ default initialization |
SetOrMapImplEntry()
Use default initialization of members.
SetOrMapImplEntry(const KE& keyOrElement, const VN& valueOrNil)
Set m_keyOrElement = keyOrElement.
Set m_valueOrNil = valueOrNil.
SetOrMapImplEntry(const SetOrMapImplEntry<KE, VN>& iterator)
Set *this = iterator.
~SetOrMapImplEntry() override
Defined as = default.
SetOrMapImplEntry& operator=(const SetOrMapImplEntry&<KE, VN> iterator)
If this != &iterator
Set m_keyOrElement = iterator.keyOrElement.
Set m_valueOrNil = iterator.valueOrNil.
const KE& getElement() const
Return a reference to m_keyOrElement.
const KE& getKey() const override
Return a reference to m_keyOrElement.
const VN& getValue() const override
Return a reference to m_valueOrNil.
void setKeyOrElement(const KE& keyOrElement) const
Set m_keyOrElement = keyOrElement.
void setValueOrNil(const VN& valueOrNil) const
Set m_valueOrNil = valueOrNil.