Dataflow Runtime API  3.1.1.0
Public Member Functions | List of all members
imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE > Class Template Reference

LinkedList specialization for double linked list class. More...

#include <Imt.Base.Core.Util/LinkedList.h>

Public Member Functions

 LinkedList (Allocator &listAllocator, size_t listSize)
 constructor More...
 
LinkedListIterator< Node, iteratorType::BIDIRECTIONALbegin ()
 
LinkedListConstIterator< Node, cIteratorType::BIDIRECTIONALcbegin () const
 
LinkedListIterator< Node, iteratorType::BIDIRECTIONALend ()
 
LinkedListConstIterator< Node, cIteratorType::BIDIRECTIONALcend () const
 
void push_back (const T &e)
 Adds a new element to the back of the list. More...
 
void pop_front ()
 Removes the front element of the list. More...
 
T & front ()
 Retunrns the front element of the list. More...
 
const T & front () const
 Retunrns the front element of the list. More...
 
size_t size () const
 Returns the current number of elements in the linked list. More...
 
bool empty () const
 Returns if the list is empty. More...
 
bool full () const
 Returns if the list is full. More...
 
void remove (const T &item)
 removes a valid item from the list More...
 
template<typename TT >
bool contains (TT const &item) const
 checks if a certain item0 is in the list More...
 

Detailed Description

template<typename Node, typename T, typename Allocator>
class imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >

LinkedList specialization for double linked list class.

See also
linked list basic description for details

Constructor & Destructor Documentation

◆ LinkedList()

template<typename Node , typename T , typename Allocator >
imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::LinkedList ( Allocator &  listAllocator,
size_t  listSize 
)
inline

constructor

Parameters
listAllocatormust pass an initialized Alloctor
listSizenumber of T that can be stored inside the Allocator

Member Function Documentation

◆ begin()

template<typename Node , typename T , typename Allocator >
LinkedListIterator<Node, iteratorType::BIDIRECTIONAL> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::begin ( )
inline

◆ cbegin()

template<typename Node , typename T , typename Allocator >
LinkedListConstIterator<Node, cIteratorType::BIDIRECTIONAL> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::cbegin ( ) const
inline

◆ cend()

template<typename Node , typename T , typename Allocator >
LinkedListConstIterator<Node, cIteratorType::BIDIRECTIONAL> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::cend ( ) const
inline

◆ contains()

template<typename Node , typename T , typename Allocator >
template<typename TT >
bool imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::contains ( TT const &  item) const
inline

checks if a certain item0 is in the list

Parameters
itemto check
Returns
true if the item is in the list, otherwise false is returned

◆ empty()

template<typename Node , typename T , typename Allocator >
bool imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::empty ( ) const
inline

Returns if the list is empty.

Returns
True if the list is empty and false otherwise.

◆ end()

template<typename Node , typename T , typename Allocator >
LinkedListIterator<Node, iteratorType::BIDIRECTIONAL> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::end ( )
inline

◆ front() [1/2]

template<typename Node , typename T , typename Allocator >
T& imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::front ( )
inline

Retunrns the front element of the list.

Returns
Reference to the front element of the list.
Note
Calling this function on an empty container causes undefined behavior.

◆ front() [2/2]

template<typename Node , typename T , typename Allocator >
const T& imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::front ( ) const
inline

Retunrns the front element of the list.

Returns
Reference to the front element of the list.
Note
Calling this function on an empty container causes undefined behavior.

◆ full()

template<typename Node , typename T , typename Allocator >
bool imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::full ( ) const
inline

Returns if the list is full.

Returns
True if the list is full and false otherwise.

◆ pop_front()

template<typename Node , typename T , typename Allocator >
void imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::pop_front ( )
inline

Removes the front element of the list.

Note
Calling this function on an empty container causes undefined behavior.

◆ push_back()

template<typename Node , typename T , typename Allocator >
void imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::push_back ( const T &  e)
inline

Adds a new element to the back of the list.

Parameters
eThe new element to copy to the list.
Note
In case of a full memory nothing happens (element is not added).

◆ remove()

template<typename Node , typename T , typename Allocator >
void imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::remove ( const T &  item)
inline

removes a valid item from the list

Parameters
itemto remove

◆ size()

template<typename Node , typename T , typename Allocator >
size_t imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::DOUBLE >::size ( ) const
inline

Returns the current number of elements in the linked list.

Returns
Number of elements in the list.

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