![]() |
Scanframe Modular Application 0.1.0
|
Counted deque having additional methods and operators for ease of usage. More...
#include <TDeque.h>


Public Types | |
| typedef std::deque< T > | base_type |
| Base type of this template . | |
| typedef base_type::size_type | size_type |
| Size type of this template. | |
| typedef base_type::value_type | value_type |
| Value type contained by this deque template. | |
Public Member Functions | |
| TDeque ()=default | |
| Default constructor. | |
| template<typename InputIterator > | |
| TDeque (InputIterator first, InputIterator last) | |
| Initializing constructor using an iterator. | |
| TDeque (std::initializer_list< value_type > list) | |
Initializing constructor using list like:TDeque que{1,2,3,4,5,6,7} | |
| TDeque (const base_type &sv) | |
| Copy constructor for base type. | |
| TDeque (size_type sz) | |
| Initializing constructor. | |
| size_type | add (const T &) |
| Adds item at the end of the deque. | |
| size_type | add (const TDeque< T > &) |
| Adds the deques items at the end of the deque. | |
| bool | addAt (const T &t, size_type index) |
| Adds an item at index position. | |
| bool | detach (const T &t) |
| Removes specific item from the list by instance. | |
| bool | detachAt (size_type index) |
| Removes specific item from the list by index. | |
| bool | isEmpty () const |
| Returns true when empty false otherwise. | |
| void | flush () |
| Removes all entries from the deque. | |
| void | flush (size_type stop, size_type start=0) |
| Removes specific range of entries from the deque. | |
| size_type | find (const T &) const |
| Finds an entry by instance in the deque. | |
| size_type | count () const |
| Returns the amount of entries in the deque. | |
| T & | get (size_type i) |
| Gets entry from index position. | |
| const T & | get (size_type i) const |
| Const version of getting entry from index position. | |
| base_type | getBase () |
| Returns the base type to access it methods explicitly. | |
| base_type | getBase () const |
| Returns the constant const base type. | |
| T & | operator[] (size_type i) |
| Array operator. | |
| const T & | operator[] (size_type i) const |
| Const array operator. | |
| std::ostream & | write (std::ostream &os, bool inc_hex) const |
Static Public Attributes | |
| static const size_t | npos = static_cast<size_type>(-1) |
| Value returned by various member functions when they fail. | |
Counted deque having additional methods and operators for ease of usage.
This template class extends the std::deque template with easier to use methods for adding finding entries and an array operator.
| T | Type contained by the deque. |
| typedef std::deque<T> sf::TDeque< T >::base_type |
Base type of this template .
| typedef base_type::size_type sf::TDeque< T >::size_type |
Size type of this template.
| typedef base_type::value_type sf::TDeque< T >::value_type |
Value type contained by this deque template.
|
default |
Default constructor.
|
inline |
Initializing constructor using an iterator.
|
inline |
Initializing constructor using list like:
TDeque que{1,2,3,4,5,6,7}
|
inlineexplicit |
Copy constructor for base type.
|
inlineexplicit |
Initializing constructor.
| sz | Size of the deque. |
| TDeque< T >::size_type sf::TDeque< T >::add | ( | const T & | t | ) |
Adds item at the end of the deque.
| TDeque< T >::size_type sf::TDeque< T >::add | ( | const TDeque< T > & | tv | ) |
Adds the deques items at the end of the deque.
| bool sf::TDeque< T >::addAt | ( | const T & | t, |
| size_type | index | ||
| ) |
Adds an item at index position.
| t | Reference of instance. |
| index | Position where to add/insert. |
|
inline |
Returns the amount of entries in the deque.
| bool sf::TDeque< T >::detach | ( | const T & | t | ) |
Removes specific item from the list by instance.
Uses the compare operator from type T to find it.
| t | Reference of instance to detach. |
| bool sf::TDeque< T >::detachAt | ( | size_type | index | ) |
Removes specific item from the list by index.
| index | Index of the item. |
| TDeque< T >::size_type sf::TDeque< T >::find | ( | const T & | t | ) | const |
Finds an entry by instance in the deque.
|
inline |
Removes all entries from the deque.
|
inline |
Removes specific range of entries from the deque.
| stop | |
| start |
|
inline |
Gets entry from index position.
| i | Index position |
|
inline |
Const version of getting entry from index position.
| i | Index position |
|
inline |
Returns the base type to access it methods explicitly.
|
inline |
Returns the constant const base type.
|
inline |
Returns true when empty false otherwise.
|
inline |
Array operator.
Array operator needs reimplementation using std::deque::at() which does a range check in contrast to the std::deque::operator[] functions.
| i | Index position |
|
inline |
Const array operator.
Array operator needs reimplementation using std::deque::at() which does a range check in contrast to the std::deque::operator[] functions.
| i | Index position |
| std::ostream & sf::TDeque< T >::write | ( | std::ostream & | os, |
| bool | inc_hex | ||
| ) | const |
Writes the content to an output stream.
| os | Output stream. |
| inc_hex | Include hex notation when an integer type. |
|
static |
Value returned by various member functions when they fail.