Public Types | Public Member Functions | Public Attributes | List of all members
ecl::PushAndPop< Type, DynamicStorage > Class Template Reference

Surpport push and pack operation. More...

#include <push_and_pop_dynamic.hpp>

Public Types

typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef std::ptrdiff_t difference_type
 
typedef formatters::PushAndPopFormatter< Type, DynamicStorageFormatter
 Formatter for this class. More...
 
typedef Type * iterator
 
typedef Type & reference
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::size_t size_type
 
typedef Type value_type
 

Public Member Functions

unsigned int asize ()
 The size allocated in memory for the fifo. More...
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
iterator end ()
 
const_iterator end () const
 
void fill (const Type &d)
 
void operator() (const PushAndPop< Type, 0 > &otherOne)
 
Type & operator[] (int idx)
 
const Type & operator[] (int idx) const
 
Type pop_front ()
 
void push_back (const Type &datum)
 Pushes an element onto the back of the container. More...
 
 PushAndPop ()
 Default constructor. More...
 
 PushAndPop (const unsigned int length)
 
 PushAndPop (const unsigned int length, const Type &d)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void resize (unsigned int length)
 
unsigned int size () const
 
virtual ~PushAndPop ()
 

Public Attributes

const typedef Type * const_iterator
 
const typedef Type & const_reference
 
ecl::Array< Type > data
 
int follower
 
int leader
 
unsigned int size_fifo
 

Detailed Description

template<typename Type>
class ecl::PushAndPop< Type, DynamicStorage >

Surpport push and pack operation.

ACHTUNG! ACHTUNG! ACHTUNG! ACHTUNG! ACHTUNG! ACHTUNG! ACHTUNG!

This is very experimental and has a few unfinished, surprising. automatic behaviours.

Usage:

@code
See also
ecl::Array.

Definition at line 77 of file push_and_pop_dynamic.hpp.

Member Typedef Documentation

◆ const_reverse_iterator

template<typename Type >
typedef std::reverse_iterator<const_iterator> ecl::PushAndPop< Type, DynamicStorage >::const_reverse_iterator

Constant reverse iterator type.

Definition at line 90 of file push_and_pop_dynamic.hpp.

◆ difference_type

template<typename Type >
typedef std::ptrdiff_t ecl::PushAndPop< Type, DynamicStorage >::difference_type

Definition at line 88 of file push_and_pop_dynamic.hpp.

◆ Formatter

Formatter for this class.

Definition at line 91 of file push_and_pop_dynamic.hpp.

◆ iterator

template<typename Type >
typedef Type* ecl::PushAndPop< Type, DynamicStorage >::iterator

Iterator type.

Definition at line 83 of file push_and_pop_dynamic.hpp.

◆ reference

template<typename Type >
typedef Type& ecl::PushAndPop< Type, DynamicStorage >::reference

Element reference type.

Definition at line 85 of file push_and_pop_dynamic.hpp.

◆ reverse_iterator

template<typename Type >
typedef std::reverse_iterator<iterator> ecl::PushAndPop< Type, DynamicStorage >::reverse_iterator

Reverse iterator type.

Definition at line 89 of file push_and_pop_dynamic.hpp.

◆ size_type

template<typename Type >
typedef std::size_t ecl::PushAndPop< Type, DynamicStorage >::size_type

Type used to denote the length of the array.

Definition at line 87 of file push_and_pop_dynamic.hpp.

◆ value_type

template<typename Type >
typedef Type ecl::PushAndPop< Type, DynamicStorage >::value_type

Element type.

Definition at line 82 of file push_and_pop_dynamic.hpp.

Constructor & Destructor Documentation

◆ PushAndPop() [1/3]

template<typename Type >
ecl::PushAndPop< Type, DynamicStorage >::PushAndPop ( )
inline

Default constructor.

Creates a dynamic push and pop container of zero length.

Definition at line 98 of file push_and_pop_dynamic.hpp.

◆ PushAndPop() [2/3]

template<typename Type >
ecl::PushAndPop< Type, DynamicStorage >::PushAndPop ( const unsigned int  length)
inline

Definition at line 100 of file push_and_pop_dynamic.hpp.

◆ PushAndPop() [3/3]

template<typename Type >
ecl::PushAndPop< Type, DynamicStorage >::PushAndPop ( const unsigned int  length,
const Type &  d 
)
inline

Definition at line 107 of file push_and_pop_dynamic.hpp.

◆ ~PushAndPop()

template<typename Type >
virtual ecl::PushAndPop< Type, DynamicStorage >::~PushAndPop ( )
inlinevirtual

Definition at line 116 of file push_and_pop_dynamic.hpp.

Member Function Documentation

◆ asize()

template<typename Type >
unsigned int ecl::PushAndPop< Type, DynamicStorage >::asize ( )
inline

The size allocated in memory for the fifo.

This is different to the actual used size.

See also
size()

Definition at line 271 of file push_and_pop_dynamic.hpp.

◆ begin() [1/2]

template<typename Type >
iterator ecl::PushAndPop< Type, DynamicStorage >::begin ( )
inline

Generates a pointer (iterator) pointing to the start of the array.

Returns
iterator : points to the beginning of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 133 of file push_and_pop_dynamic.hpp.

◆ begin() [2/2]

template<typename Type >
const_iterator ecl::PushAndPop< Type, DynamicStorage >::begin ( ) const
inline

Generates a const pointer (iterator) pointing to the start of the array.

Returns
const_iterator : constant pointer (iterator) pointing to the end of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 142 of file push_and_pop_dynamic.hpp.

◆ clear()

template<typename Type >
void ecl::PushAndPop< Type, DynamicStorage >::clear ( )
inline

Definition at line 283 of file push_and_pop_dynamic.hpp.

◆ end() [1/2]

template<typename Type >
iterator ecl::PushAndPop< Type, DynamicStorage >::end ( )
inline

Generates an pointer (iterator) pointing to the end of the array.

Returns
iterator : points to the end of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 151 of file push_and_pop_dynamic.hpp.

◆ end() [2/2]

template<typename Type >
const_iterator ecl::PushAndPop< Type, DynamicStorage >::end ( ) const
inline

Generates a const pointer (iterator) pointing to the end of the array.

Returns
const_iterator : constant pointer (iterator) pointing to the end of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 160 of file push_and_pop_dynamic.hpp.

◆ fill()

template<typename Type >
void ecl::PushAndPop< Type, DynamicStorage >::fill ( const Type &  d)
inline

Definition at line 252 of file push_and_pop_dynamic.hpp.

◆ operator()()

template<typename Type >
void ecl::PushAndPop< Type, DynamicStorage >::operator() ( const PushAndPop< Type, 0 > &  otherOne)
inline

Definition at line 216 of file push_and_pop_dynamic.hpp.

◆ operator[]() [1/2]

template<typename Type >
Type& ecl::PushAndPop< Type, DynamicStorage >::operator[] ( int  idx)
inline

Definition at line 206 of file push_and_pop_dynamic.hpp.

◆ operator[]() [2/2]

template<typename Type >
const Type& ecl::PushAndPop< Type, DynamicStorage >::operator[] ( int  idx) const
inline

Definition at line 211 of file push_and_pop_dynamic.hpp.

◆ pop_front()

template<typename Type >
Type ecl::PushAndPop< Type, DynamicStorage >::pop_front ( )
inline

Definition at line 244 of file push_and_pop_dynamic.hpp.

◆ push_back()

template<typename Type >
void ecl::PushAndPop< Type, DynamicStorage >::push_back ( const Type &  datum)
inline

Pushes an element onto the back of the container.

If there is no empty room, it simply makes room by popping an element of the front.

Definition at line 232 of file push_and_pop_dynamic.hpp.

◆ rbegin() [1/2]

template<typename Type >
reverse_iterator ecl::PushAndPop< Type, DynamicStorage >::rbegin ( )
inline

Generates a reverse iterator pointing to the end of the array.

Returns
reverse_iterator : points to the end of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 169 of file push_and_pop_dynamic.hpp.

◆ rbegin() [2/2]

template<typename Type >
const_reverse_iterator ecl::PushAndPop< Type, DynamicStorage >::rbegin ( ) const
inline

Generates a constant reverse iterator pointing to the end of the array.

Returns
const_reverse_iterator : constant reverse iterator pointing to the end of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 178 of file push_and_pop_dynamic.hpp.

◆ rend() [1/2]

template<typename Type >
reverse_iterator ecl::PushAndPop< Type, DynamicStorage >::rend ( )
inline

Generates a reverse iterator pointing to the beginning of the array.

Returns
reverse_iterator : points to the beginning of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 187 of file push_and_pop_dynamic.hpp.

◆ rend() [2/2]

template<typename Type >
const_reverse_iterator ecl::PushAndPop< Type, DynamicStorage >::rend ( ) const
inline

Generates a constant reverse iterator pointing to the beginning of the array.

Returns
const_reverse_iterator : constant reverse iterator pointing to the beginning of the array.
Exceptions
StandardException: throws if no storage has been allocated [debug mode only].

Definition at line 196 of file push_and_pop_dynamic.hpp.

◆ resize()

template<typename Type >
void ecl::PushAndPop< Type, DynamicStorage >::resize ( unsigned int  length)
inline

Definition at line 257 of file push_and_pop_dynamic.hpp.

◆ size()

template<typename Type >
unsigned int ecl::PushAndPop< Type, DynamicStorage >::size ( ) const
inline

Definition at line 276 of file push_and_pop_dynamic.hpp.

Member Data Documentation

◆ const_iterator

template<typename Type >
const typedef Type* ecl::PushAndPop< Type, DynamicStorage >::const_iterator

Constant iterator type.

Definition at line 84 of file push_and_pop_dynamic.hpp.

◆ const_reference

template<typename Type >
const typedef Type& ecl::PushAndPop< Type, DynamicStorage >::const_reference

Element const reference type.

Definition at line 86 of file push_and_pop_dynamic.hpp.

◆ data

template<typename Type >
ecl::Array<Type> ecl::PushAndPop< Type, DynamicStorage >::data

Definition at line 290 of file push_and_pop_dynamic.hpp.

◆ follower

template<typename Type >
int ecl::PushAndPop< Type, DynamicStorage >::follower

Definition at line 293 of file push_and_pop_dynamic.hpp.

◆ leader

template<typename Type >
int ecl::PushAndPop< Type, DynamicStorage >::leader

Definition at line 292 of file push_and_pop_dynamic.hpp.

◆ size_fifo

template<typename Type >
unsigned int ecl::PushAndPop< Type, DynamicStorage >::size_fifo

Definition at line 291 of file push_and_pop_dynamic.hpp.


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


ecl_containers
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:34