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

Surpport push and pack operation. More...

#include <push_and_pop_fixed.hpp>

Public Types

typedef formatters::PushAndPopFormatter< Type, Size > Formatter
 Formatter for this class. More...
 

Public Member Functions

unsigned int asize ()
 
void clear ()
 
void fill (const Type &d)
 
void operator() (const PushAndPop< Type, Size > &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 ()
 
 PushAndPop (const Type &d)
 
void showMe ()
 
unsigned int size () const
 
virtual ~PushAndPop ()
 

Private Attributes

ecl::Array< Type, Size+1 > data
 
int follower
 
int leader
 
unsigned int size_fifo
 

Detailed Description

template<typename Type, std::size_t Size = DynamicStorage>
class ecl::PushAndPop< Type, Size >

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 76 of file push_and_pop_fixed.hpp.

Member Typedef Documentation

◆ Formatter

template<typename Type, std::size_t Size = DynamicStorage>
typedef formatters::PushAndPopFormatter<Type,Size> ecl::PushAndPop< Type, Size >::Formatter

Formatter for this class.

Definition at line 79 of file push_and_pop_fixed.hpp.

Constructor & Destructor Documentation

◆ PushAndPop() [1/2]

template<typename Type, std::size_t Size = DynamicStorage>
ecl::PushAndPop< Type, Size >::PushAndPop ( )
inline

Definition at line 81 of file push_and_pop_fixed.hpp.

◆ PushAndPop() [2/2]

template<typename Type, std::size_t Size = DynamicStorage>
ecl::PushAndPop< Type, Size >::PushAndPop ( const Type &  d)
inline

Definition at line 89 of file push_and_pop_fixed.hpp.

◆ ~PushAndPop()

template<typename Type, std::size_t Size = DynamicStorage>
virtual ecl::PushAndPop< Type, Size >::~PushAndPop ( )
inlinevirtual

Definition at line 98 of file push_and_pop_fixed.hpp.

Member Function Documentation

◆ asize()

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

To get the assigned buffer size while size() return number of data in fifo

Returns
assigned buffer size

Definition at line 157 of file push_and_pop_fixed.hpp.

◆ clear()

template<typename Type, std::size_t Size = DynamicStorage>
void ecl::PushAndPop< Type, Size >::clear ( )
inline

Definition at line 169 of file push_and_pop_fixed.hpp.

◆ fill()

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

Definition at line 147 of file push_and_pop_fixed.hpp.

◆ operator()()

template<typename Type, std::size_t Size = DynamicStorage>
void ecl::PushAndPop< Type, Size >::operator() ( const PushAndPop< Type, Size > &  otherOne)
inline

Definition at line 111 of file push_and_pop_fixed.hpp.

◆ operator[]() [1/2]

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

Definition at line 101 of file push_and_pop_fixed.hpp.

◆ operator[]() [2/2]

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

Definition at line 106 of file push_and_pop_fixed.hpp.

◆ pop_front()

template<typename Type, std::size_t Size = DynamicStorage>
Type ecl::PushAndPop< Type, Size >::pop_front ( )
inline

Definition at line 139 of file push_and_pop_fixed.hpp.

◆ push_back()

template<typename Type, std::size_t Size = DynamicStorage>
void ecl::PushAndPop< Type, Size >::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 127 of file push_and_pop_fixed.hpp.

◆ showMe()

template<typename Type, std::size_t Size = DynamicStorage>
void ecl::PushAndPop< Type, Size >::showMe ( )
inline

Definition at line 175 of file push_and_pop_fixed.hpp.

◆ size()

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

Definition at line 162 of file push_and_pop_fixed.hpp.

Member Data Documentation

◆ data

template<typename Type, std::size_t Size = DynamicStorage>
ecl::Array<Type,Size+1> ecl::PushAndPop< Type, Size >::data
private

Definition at line 181 of file push_and_pop_fixed.hpp.

◆ follower

template<typename Type, std::size_t Size = DynamicStorage>
int ecl::PushAndPop< Type, Size >::follower
private

Definition at line 184 of file push_and_pop_fixed.hpp.

◆ leader

template<typename Type, std::size_t Size = DynamicStorage>
int ecl::PushAndPop< Type, Size >::leader
private

Definition at line 183 of file push_and_pop_fixed.hpp.

◆ size_fifo

template<typename Type, std::size_t Size = DynamicStorage>
unsigned int ecl::PushAndPop< Type, Size >::size_fifo
private

Definition at line 182 of file push_and_pop_fixed.hpp.


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


ecl_containers
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:43