AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
AQueue< StoredType > Class Template Reference

A std::queue with AUI extensions. More...

Detailed Description

template<class StoredType>
class AQueue< StoredType >

A std::queue with AUI extensions.

Public Member Functions

void removeAll (const StoredType &item) noexcept
 
void removeFirst (const StoredType &item) noexcept
 
AQueue< StoredType > & operator<< (const StoredType &rhs)
 
AQueue< StoredType > & operator<< (StoredType &&rhs)
 
bool contains (const StoredType &value) const noexcept
 
template<typename OtherContainer >
bool isSubsetOf (const OtherContainer &c) const noexcept
 
template<typename Factory >
StoredType popOrGenerate (Factory factory) noexcept(noexcept(factory()))
 Pops the element and returns it. If queue is empty, the result of factory() returned. The result of factory() is never added to the queue. More...
 

Member Function Documentation

◆ contains()

template<class StoredType >
bool AQueue< StoredType >::contains ( const StoredType &  value) const
inlinenoexcept
Returns
true if container contains an element, false otherwise.

◆ isSubsetOf()

template<class StoredType >
template<typename OtherContainer >
bool AQueue< StoredType >::isSubsetOf ( const OtherContainer &  c) const
inlinenoexcept
Returns
true if c container is a subset of this container, false otherwise.

◆ popOrGenerate()

template<class StoredType >
template<typename Factory >
StoredType AQueue< StoredType >::popOrGenerate ( Factory  factory)
inlinenoexcept

Pops the element and returns it. If queue is empty, the result of factory() returned. The result of factory() is never added to the queue.

Returns
result of front() if not empty; result of factory() otherwise

◆ removeAll()

template<class StoredType >
void AQueue< StoredType >::removeAll ( const StoredType &  item)
inlinenoexcept

Removes all occurrences of item.

Parameters
itemelement to remove.

◆ removeFirst()

template<class StoredType >
void AQueue< StoredType >::removeFirst ( const StoredType &  item)
inlinenoexcept

Removes first occurrence of item.

Parameters
itemelement to remove.

#include <AUI/Common/AQueue.h>


The documentation for this class was generated from the following file:
Inheritance diagram for AQueue< StoredType >:
Collaboration diagram for AQueue< StoredType >: