yat  0.18pre
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
theplu::yat::utility::detail::BasicQueue< Derived, T, Container > Class Template Reference

#include <yat/utility/BasicQueue.h>

Public Types

typedef Container::value_type value_type
 Type of object stored.
 
typedef Container::size_type size_type
 

Public Member Functions

 BasicQueue (void)
 
 BasicQueue (const BasicQueue &other)
 
 BasicQueue (const Container &container)
 
void clear (void)
 clear queue More...
 
bool empty (void) const
 
void pop (T &value)
 access next element in queue More...
 
void push (const T &t)
 insert an element into container
 
void push (T &&t)
 insert an element into container More...
 
size_type size (void) const
 
bool try_pop (T &value)
 

Protected Member Functions

void assign (const BasicQueue &other)
 

Protected Attributes

Container q_
 data
 

Detailed Description

template<class Derived, typename T, class Container>
class theplu::yat::utility::detail::BasicQueue< Derived, T, Container >

Base class for Queue and PriorityQueue

Member Typedef Documentation

template<class Derived, typename T, class Container>
typedef Container::size_type theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::size_type

An unsigned integral type.

See also
size(void)

Constructor & Destructor Documentation

template<class Derived, typename T, class Container>
theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::BasicQueue ( void  )
inline

Default constructor

template<class Derived, typename T, class Container>
theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::BasicQueue ( const BasicQueue< Derived, T, Container > &  other)
inline

Copy constructor

template<class Derived, typename T, class Container>
theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::BasicQueue ( const Container &  container)
inlineexplicit

Construct queue from underlying Container

Member Function Documentation

template<class Derived, typename T, class Container>
void theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::assign ( const BasicQueue< Derived, T, Container > &  other)
inlineprotected

assign other to this

template<class Derived, typename T, class Container>
void theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::clear ( void  )
inline

clear queue

Since
new in yat 0.15
template<class Derived, typename T, class Container>
bool theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::empty ( void  ) const
inline
Returns
true if container's size is zero
template<class Derived, typename T, class Container>
void theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::pop ( T &  value)
inline

access next element in queue

Access the next element is queue. If container is empty, process is waiting until other process is inserting element into container.

template<class Derived, typename T, class Container>
void theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::push ( T &&  t)
inline

insert an element into container

Note
only available if configured and built with cxx11 support
Since
New in yat 0.15
template<class Derived, typename T, class Container>
size_type theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::size ( void  ) const
inline
Returns
Number of elements stored in container
template<class Derived, typename T, class Container>
bool theplu::yat::utility::detail::BasicQueue< Derived, T, Container >::try_pop ( T &  value)
inline

If Queue is empty() do nothing and return false, else pop the element into value and return true


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

Generated on Tue Oct 20 2020 02:55:45 for yat by  doxygen 1.8.11