Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::ThreadSafeDeque< TYPE > Class Template Referencefinal

Public Types

using DequeType = AZStd::deque< TYPE >
 

Public Member Functions

AZStd::size_t Size () const
 
void Clear ()
 Clears the contents of the deque.
 
template<typename TYPE_DEDUCED >
void PushFrontItem (TYPE_DEDUCED &&item)
 
template<typename TYPE_DEDUCED >
void PushBackItem (TYPE_DEDUCED &&item)
 
bool PopFrontItem (TYPE &outItem)
 
bool PopBackItem (TYPE &outItem)
 
void Swap (DequeType &swapDeque)
 
void Visit (const AZStd::function< void(TYPE &)> &visitor)
 
void VisitDeque (const AZStd::function< void(DequeType &)> &visitor)
 

Member Function Documentation

◆ PopBackItem()

template<typename TYPE >
bool AZ::ThreadSafeDeque< TYPE >::PopBackItem ( TYPE &  outItem)
inline

Pops the last item from the dequeue.

Parameters
outItemoutput parameter containing the element at the back of the dequeue
Returns
boolean true on success, false if the dequeue was empty

◆ PopFrontItem()

template<typename TYPE >
bool AZ::ThreadSafeDeque< TYPE >::PopFrontItem ( TYPE &  outItem)
inline

Pops the front item from the dequeue.

Parameters
outItemoutput parameter containing the element at the front of the dequeue
Returns
boolean true on success, false if the dequeue was empty

◆ PushBackItem()

template<typename TYPE >
template<typename TYPE_DEDUCED >
void AZ::ThreadSafeDeque< TYPE >::PushBackItem ( TYPE_DEDUCED &&  item)
inline

Pushes a new item to the back of the dequeue.

Parameters
itemelement to push to the back of the dequeue

◆ PushFrontItem()

template<typename TYPE >
template<typename TYPE_DEDUCED >
void AZ::ThreadSafeDeque< TYPE >::PushFrontItem ( TYPE_DEDUCED &&  item)
inline

Pushes a new item to the front of the dequeue.

Parameters
itemelement to push to the front of the dequeue

◆ Size()

template<typename TYPE >
AZStd::size_t AZ::ThreadSafeDeque< TYPE >::Size
inline

Returns the size of the dequeue in numbers of elements.

Returns
the number of elements contained in the deque

◆ Swap()

template<typename TYPE >
void AZ::ThreadSafeDeque< TYPE >::Swap ( DequeType swapDeque)
inline

Swaps the underlying dequeue data with the input dequeue.

Parameters
swapDequethe non-thread safe deque to swap the internal deque with

◆ Visit()

template<typename TYPE >
void AZ::ThreadSafeDeque< TYPE >::Visit ( const AZStd::function< void(TYPE &)> &  visitor)
inline

Visits all the elements of the deque under lock using the provided functor.

Parameters
visitorthe functor to visit all deque elements with

◆ VisitDeque()

template<typename TYPE >
void AZ::ThreadSafeDeque< TYPE >::VisitDeque ( const AZStd::function< void(DequeType &)> &  visitor)
inline

Visits the whole internal deque under lock using the provided functor.

Parameters
visitorthe functor to operate on the deque with

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