F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Fw::ArraySet< T, C > Class Template Referencefinal

#include <Fw/DataStructures/ArraySet.hpp>

Inheritance diagram for Fw::ArraySet< T, C >:
Fw::SetBase< T > Fw::SizedContainer

Public Types

using ConstIterator = SetConstIterator< T >
 The type of a const iterator. More...
 
using Entry = SetOrMapImplEntry< T, Nil >
 The type of an implementation entry. More...
 
using Entries = Entry[C]
 The type of the implementation entries. More...
 
- Public Types inherited from Fw::SetBase< T >
using ConstIterator = SetConstIterator< T >
 The type of a set const iterator. More...
 

Public Member Functions

 ArraySet ()
 Zero-argument constructor. More...
 
 ArraySet (const ArraySet< T, C > &set)
 Copy constructor. More...
 
 ~ArraySet () override=default
 Destructor. More...
 
ArraySet< T, C > & operator= (const ArraySet< T, C > &set)
 operator= More...
 
ConstIterator begin () const override
 
void clear () override
 Clear the set. More...
 
ConstIterator end () const override
 
Success find (const T &element) const override
 
FwSizeType getCapacity () const override
 
FwSizeType getSize () const override
 
Success insert (const T &element) override
 
Success remove (const T &element) override
 
- Public Member Functions inherited from Fw::SetBase< T >
void copyDataFrom (const SetBase< T > &set)
 Copy data from another set. More...
 
- Public Member Functions inherited from Fw::SizedContainer
bool isEmpty () const
 
bool isFull () const
 

Friends

template<typename TT , FwSizeType CC>
class ArraySetTester
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::SetBase< T >
 SetBase ()
 Zero-argument constructor. More...
 
virtual ~SetBase ()=default
 Destructor. More...
 
- Protected Member Functions inherited from Fw::SizedContainer
 SizedContainer ()
 Zero-argument constructor. More...
 
virtual ~SizedContainer ()=default
 Destructor. More...
 

Detailed Description

template<typename T, FwSizeType C>
class Fw::ArraySet< T, C >

Definition at line 15 of file ArraySet.hpp.

Member Typedef Documentation

◆ ConstIterator

template<typename T , FwSizeType C>
using Fw::ArraySet< T, C >::ConstIterator = SetConstIterator<T>

The type of a const iterator.

Definition at line 35 of file ArraySet.hpp.

◆ Entries

template<typename T , FwSizeType C>
using Fw::ArraySet< T, C >::Entries = Entry[C]

The type of the implementation entries.

Definition at line 41 of file ArraySet.hpp.

◆ Entry

template<typename T , FwSizeType C>
using Fw::ArraySet< T, C >::Entry = SetOrMapImplEntry<T, Nil>

The type of an implementation entry.

Definition at line 38 of file ArraySet.hpp.

Constructor & Destructor Documentation

◆ ArraySet() [1/2]

template<typename T , FwSizeType C>
Fw::ArraySet< T, C >::ArraySet ( )
inline

Zero-argument constructor.

Definition at line 49 of file ArraySet.hpp.

◆ ArraySet() [2/2]

template<typename T , FwSizeType C>
Fw::ArraySet< T, C >::ArraySet ( const ArraySet< T, C > &  set)
inline

Copy constructor.

Definition at line 52 of file ArraySet.hpp.

◆ ~ArraySet()

template<typename T , FwSizeType C>
Fw::ArraySet< T, C >::~ArraySet ( )
overridedefault

Destructor.

Member Function Documentation

◆ begin()

template<typename T , FwSizeType C>
ConstIterator Fw::ArraySet< T, C >::begin ( ) const
inlineoverridevirtual

Get the begin iterator

Returns
The iterator

Implements Fw::SetBase< T >.

Definition at line 70 of file ArraySet.hpp.

◆ clear()

template<typename T , FwSizeType C>
void Fw::ArraySet< T, C >::clear ( )
inlineoverridevirtual

Clear the set.

Implements Fw::SizedContainer.

Definition at line 73 of file ArraySet.hpp.

◆ end()

template<typename T , FwSizeType C>
ConstIterator Fw::ArraySet< T, C >::end ( ) const
inlineoverridevirtual

Get the end iterator

Returns
The iterator

Implements Fw::SetBase< T >.

Definition at line 77 of file ArraySet.hpp.

◆ find()

template<typename T , FwSizeType C>
Success Fw::ArraySet< T, C >::find ( const T &  element) const
inlineoverridevirtual

Find an element in the set

Returns
SUCCESS if the element was found
Parameters
elementThe element

Implements Fw::SetBase< T >.

Definition at line 81 of file ArraySet.hpp.

◆ getCapacity()

template<typename T , FwSizeType C>
FwSizeType Fw::ArraySet< T, C >::getCapacity ( ) const
inlineoverridevirtual

Get the capacity of the set (max number of entries)

Returns
The capacity

Implements Fw::SizedContainer.

Definition at line 88 of file ArraySet.hpp.

◆ getSize()

template<typename T , FwSizeType C>
FwSizeType Fw::ArraySet< T, C >::getSize ( ) const
inlineoverridevirtual

Get the size (number of entries)

Returns
The size

Implements Fw::SizedContainer.

Definition at line 92 of file ArraySet.hpp.

◆ insert()

template<typename T , FwSizeType C>
Success Fw::ArraySet< T, C >::insert ( const T &  element)
inlineoverridevirtual

Insert an element in the set

Returns
SUCCESS if there is room in the set
Parameters
elementThe element

Implements Fw::SetBase< T >.

Definition at line 96 of file ArraySet.hpp.

◆ operator=()

template<typename T , FwSizeType C>
ArraySet<T, C>& Fw::ArraySet< T, C >::operator= ( const ArraySet< T, C > &  set)
inline

operator=

Definition at line 63 of file ArraySet.hpp.

◆ remove()

template<typename T , FwSizeType C>
Success Fw::ArraySet< T, C >::remove ( const T &  element)
inlineoverridevirtual

Remove an element from the set

Returns
SUCCESS if the key was there
Parameters
elementThe element

Implements Fw::SetBase< T >.

Definition at line 103 of file ArraySet.hpp.

Friends And Related Function Documentation

◆ ArraySetTester

template<typename T , FwSizeType C>
template<typename TT , FwSizeType CC>
friend class ArraySetTester
friend

Definition at line 20 of file ArraySet.hpp.


The documentation for this class was generated from the following file: