7 #ifndef Fw_ExternalRedBlackTreeSet_HPP 8 #define Fw_ExternalRedBlackTreeSet_HPP 23 template <
typename TT>
83 this->m_impl =
set.m_impl;
104 return this->m_impl.
find(element, nil);
119 return this->m_impl.
insert(element,
Nil());
127 return this->m_impl.
remove(element, nil);
137 this->m_impl.
setStorage(nodes, freeNodes, capacity);
FwSizeType getSize() const override
void setStorage(Node *nodes, Index *freeNodes, FwSizeType capacity)
PlatformSizeType FwSizeType
Success insert(const KE &keyOrElement, const VN &valueOrNil)
static constexpr U8 getByteArrayAlignment()
Success remove(const KE &keyOrElement, VN &valueOrNil)
ExternalRedBlackTreeSet(ByteArray data, FwSizeType capacity)
Success find(const T &element) const override
FwSizeType getCapacity() const override
ConstIterator begin() const
Get the begin iterator.
SetConstIterator< T > ConstIterator
The type of a const iterator.
ConstIterator end() const override
ExternalRedBlackTreeSet< T > & operator=(const ExternalRedBlackTreeSet< T > &set)
operator=
FwSizeType getCapacity() const
ExternalRedBlackTreeSet(Node *nodes, Index *freeNodes, FwSizeType capacity)
ExternalRedBlackTreeSet()=default
Zero-argument constructor.
FwSizeType getSize() const
static constexpr FwSizeType getByteArraySize(FwSizeType capacity)
ConstIterator begin() const override
friend class ExternalRedBlackTreeSetTester
A variable-length byte array.
void clear()
Clear the set or map.
uint8_t U8
8-bit unsigned integer
ExternalRedBlackTreeSet(const ExternalRedBlackTreeSet< T > &set)
Copy constructor.
void clear() override
Clear the set.
typename RedBlackTreeSetOrMapImpl< T, Nil >::Node Node
The type of a tree node.
static constexpr U8 getByteArrayAlignment()
typename RedBlackTreeSetOrMapImpl< T, Nil >::Index Index
The type of a tree node index.
static constexpr FwSizeType getByteArraySize(FwSizeType capacity)
ConstIterator end() const
Get the end iterator.
void setStorage(ByteArray data, FwSizeType capacity)
Success insert(const T &element) override
Success find(const KE &keyOrElement, VN &valueOrNil) const
~ExternalRedBlackTreeSet() override=default
Destructor.
void setStorage(Node *nodes, Index *freeNodes, FwSizeType capacity)