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

#include <Fw/DataStructures/ExternalArraySet.hpp>

Inheritance diagram for Fw::ExternalArraySet< T >:
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 a set entry. More...
 
- Public Types inherited from Fw::SetBase< T >
using ConstIterator = SetConstIterator< T >
 The type of a set const iterator. More...
 

Public Member Functions

 ExternalArraySet ()=default
 Zero-argument constructor. More...
 
 ExternalArraySet (Entry *entries, FwSizeType capacity)
 
 ExternalArraySet (ByteArray data, FwSizeType capacity)
 
 ExternalArraySet (const ExternalArraySet< T > &set)
 Copy constructor. More...
 
 ~ExternalArraySet () override=default
 Destructor. More...
 
ExternalArraySet< T > & operator= (const ExternalArraySet< T > &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
 
void setStorage (Entry *entries, FwSizeType capacity)
 
void setStorage (ByteArray data, FwSizeType capacity)
 
- 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
 

Static Public Member Functions

static constexpr U8 getByteArrayAlignment ()
 
static constexpr FwSizeType getByteArraySize (FwSizeType capacity)
 

Friends

template<typename TT >
class ExternalArraySetTester
 

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>
class Fw::ExternalArraySet< T >

Definition at line 18 of file ExternalArraySet.hpp.

Member Typedef Documentation

◆ ConstIterator

template<typename T>
using Fw::ExternalArraySet< T >::ConstIterator = SetConstIterator<T>

The type of a const iterator.

Definition at line 32 of file ExternalArraySet.hpp.

◆ Entry

template<typename T>
using Fw::ExternalArraySet< T >::Entry = SetOrMapImplEntry<T, Nil>

The type of a set entry.

Definition at line 35 of file ExternalArraySet.hpp.

Constructor & Destructor Documentation

◆ ExternalArraySet() [1/4]

template<typename T>
Fw::ExternalArraySet< T >::ExternalArraySet ( )
default

Zero-argument constructor.

◆ ExternalArraySet() [2/4]

template<typename T>
Fw::ExternalArraySet< T >::ExternalArraySet ( Entry entries,
FwSizeType  capacity 
)
inline

Constructor providing typed backing storage. entries must point to at least capacity elements of type ImplEntry.

Parameters
entriesThe entries
capacityThe capacity

Definition at line 47 of file ExternalArraySet.hpp.

◆ ExternalArraySet() [3/4]

template<typename T>
Fw::ExternalArraySet< T >::ExternalArraySet ( ByteArray  data,
FwSizeType  capacity 
)
inline

Constructor providing untyped backing storage. data must be aligned according to getByteArrayAlignment(). data must contain at least getByteArraySize(capacity) bytes.

Parameters
dataThe data,
capacityThe capacity

Definition at line 57 of file ExternalArraySet.hpp.

◆ ExternalArraySet() [4/4]

template<typename T>
Fw::ExternalArraySet< T >::ExternalArraySet ( const ExternalArraySet< T > &  set)
inline

Copy constructor.

Definition at line 65 of file ExternalArraySet.hpp.

◆ ~ExternalArraySet()

template<typename T>
Fw::ExternalArraySet< T >::~ExternalArraySet ( )
overridedefault

Destructor.

Member Function Documentation

◆ begin()

template<typename T>
ConstIterator Fw::ExternalArraySet< T >::begin ( ) const
inlineoverridevirtual

Get the begin iterator

Returns
The iterator

Implements Fw::SetBase< T >.

Definition at line 85 of file ExternalArraySet.hpp.

◆ clear()

template<typename T>
void Fw::ExternalArraySet< T >::clear ( )
inlineoverridevirtual

Clear the set.

Implements Fw::SizedContainer.

Definition at line 88 of file ExternalArraySet.hpp.

◆ end()

template<typename T>
ConstIterator Fw::ExternalArraySet< T >::end ( ) const
inlineoverridevirtual

Get the end iterator

Returns
The iterator

Implements Fw::SetBase< T >.

Definition at line 92 of file ExternalArraySet.hpp.

◆ find()

template<typename T>
Success Fw::ExternalArraySet< T >::find ( const T &  element) const
inlineoverridevirtual

Find a value associated with an element in the set

Returns
SUCCESS if the item was found
Parameters
elementThe element

Implements Fw::SetBase< T >.

Definition at line 96 of file ExternalArraySet.hpp.

◆ getByteArrayAlignment()

template<typename T>
static constexpr U8 Fw::ExternalArraySet< T >::getByteArrayAlignment ( )
inlinestatic

Get the alignment of the storage for an ArraySetOrMapImpl

Returns
The alignment

Definition at line 149 of file ExternalArraySet.hpp.

◆ getByteArraySize()

template<typename T>
static constexpr FwSizeType Fw::ExternalArraySet< T >::getByteArraySize ( FwSizeType  capacity)
inlinestatic

Get the size of the storage for an ExternalArray of the specified capacity, as a byte array

Returns
The byte array size
Parameters
capacityThe capacity

Definition at line 154 of file ExternalArraySet.hpp.

◆ getCapacity()

template<typename T>
FwSizeType Fw::ExternalArraySet< T >::getCapacity ( ) const
inlineoverridevirtual

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

Returns
The capacity

Implements Fw::SizedContainer.

Definition at line 104 of file ExternalArraySet.hpp.

◆ getSize()

template<typename T>
FwSizeType Fw::ExternalArraySet< T >::getSize ( ) const
inlineoverridevirtual

Get the size (number of entries)

Returns
The size

Implements Fw::SizedContainer.

Definition at line 108 of file ExternalArraySet.hpp.

◆ insert()

template<typename T>
Success Fw::ExternalArraySet< T >::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 112 of file ExternalArraySet.hpp.

◆ operator=()

template<typename T>
ExternalArraySet<T>& Fw::ExternalArraySet< T >::operator= ( const ExternalArraySet< T > &  set)
inline

operator=

Definition at line 76 of file ExternalArraySet.hpp.

◆ remove()

template<typename T>
Success Fw::ExternalArraySet< T >::remove ( const T &  element)
inlineoverridevirtual

Remove an element from the set

Returns
SUCCESS if the element was there
Parameters
elementThe element

Implements Fw::SetBase< T >.

Definition at line 119 of file ExternalArraySet.hpp.

◆ setStorage() [1/2]

template<typename T>
void Fw::ExternalArraySet< T >::setStorage ( Entry entries,
FwSizeType  capacity 
)
inline

Set the backing storage (typed data) entries must point to at least capacity elements of type ImplEntry.

Parameters
entriesThe entries
capacityThe capacity

Definition at line 127 of file ExternalArraySet.hpp.

◆ setStorage() [2/2]

template<typename T>
void Fw::ExternalArraySet< T >::setStorage ( ByteArray  data,
FwSizeType  capacity 
)
inline

Set the backing storage (untyped data) data must be aligned according to getByteArrayAlignment(). data must contain at least getByteArraySize(capacity) bytes.

Parameters
dataThe data
capacityThe capacity

Definition at line 136 of file ExternalArraySet.hpp.

Friends And Related Function Documentation

◆ ExternalArraySetTester

template<typename T>
template<typename TT >
friend class ExternalArraySetTester
friend

Definition at line 24 of file ExternalArraySet.hpp.


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