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

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

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

Public Member Functions

 LinkedList (Allocator &listAllocator, size_t listSize)
 constructor More...
 
LinkedListIterator< Node > begin ()
 
LinkedListConstIterator< Node > cbegin () const
 
LinkedListIterator< Node > end ()
 
LinkedListConstIterator< Node > cend () 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...
 

Detailed Description

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

LinkedList specialization for single 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::SINGLE >::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> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::SINGLE >::begin ( )
inline

◆ cbegin()

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

◆ cend()

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

◆ empty()

template<typename Node , typename T , typename Allocator >
bool imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::SINGLE >::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> imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::SINGLE >::end ( )
inline

◆ front() [1/2]

template<typename Node , typename T , typename Allocator >
T& imt::base::core::util::LinkedList< Node, T, Allocator, linkedListType::SINGLE >::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::SINGLE >::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::SINGLE >::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::SINGLE >::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::SINGLE >::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 node.
Note
In case of a full memory nothing happens (element is not added).

◆ size()

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

Returns the current number of elements in the linked list.

Returns
Number of elements in the liest.

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