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

#include <Fw/DataStructures/FifoQueueBase.hpp>

Inheritance diagram for Fw::FifoQueueBase< T >:
Fw::SizedContainer Fw::ExternalFifoQueue< T > Fw::FifoQueue< T, C >

Public Member Functions

virtual const T & at (FwSizeType index) const =0
 
void copyDataFrom (const FifoQueueBase< T > &queue)
 Copy data from another queue. More...
 
virtual Success enqueue (const T &e)=0
 
Success peek (T &e, FwSizeType index=0) const
 
virtual Success dequeue (T &e)=0
 
- Public Member Functions inherited from Fw::SizedContainer
virtual void clear ()=0
 Clear the container. More...
 
virtual FwSizeType getSize () const =0
 
virtual FwSizeType getCapacity () const =0
 
bool isEmpty () const
 
bool isFull () const
 

Protected Member Functions

 FifoQueueBase ()
 Zero-argument constructor. More...
 
virtual ~FifoQueueBase ()=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::FifoQueueBase< T >

Definition at line 17 of file FifoQueueBase.hpp.

Constructor & Destructor Documentation

◆ FifoQueueBase()

template<typename T>
Fw::FifoQueueBase< T >::FifoQueueBase ( )
inlineprotected

Zero-argument constructor.

Definition at line 33 of file FifoQueueBase.hpp.

◆ ~FifoQueueBase()

template<typename T>
virtual Fw::FifoQueueBase< T >::~FifoQueueBase ( )
protectedvirtualdefault

Destructor.

Member Function Documentation

◆ at()

template<typename T>
virtual const T& Fw::FifoQueueBase< T >::at ( FwSizeType  index) const
pure virtual

Get an item at an index. Indices go from left to right in the queue. Fails an assertion if the index is out of range.

Returns
The item
Parameters
indexThe index

Implemented in Fw::ExternalFifoQueue< T >, and Fw::FifoQueue< T, C >.

◆ copyDataFrom()

template<typename T>
void Fw::FifoQueueBase< T >::copyDataFrom ( const FifoQueueBase< T > &  queue)
inline

Copy data from another queue.

Parameters
queueThe queue

Definition at line 61 of file FifoQueueBase.hpp.

◆ dequeue()

template<typename T>
virtual Success Fw::FifoQueueBase< T >::dequeue ( T &  e)
pure virtual

Dequeue an item (remove from the left)

Returns
SUCCESS if item dequeued
Parameters
eThe item (output)

Implemented in Fw::ExternalFifoQueue< T >, and Fw::FifoQueue< T, C >.

◆ enqueue()

template<typename T>
virtual Success Fw::FifoQueueBase< T >::enqueue ( const T &  e)
pure virtual

Enqueue an item (add to the right)

Returns
SUCCESS if item enqueued
Parameters
eThe item (output)

Implemented in Fw::ExternalFifoQueue< T >, and Fw::FifoQueue< T, C >.

◆ peek()

template<typename T>
Success Fw::FifoQueueBase< T >::peek ( T &  e,
FwSizeType  index = 0 
) const
inline

Peek an item at an index Indices go from left to right in the range [0, size)

Returns
SUCCESS if item exists
Parameters
eThe item (output)
indexThe index (input)

Definition at line 82 of file FifoQueueBase.hpp.


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