Zth (libzth)
Loading...
Searching...
No Matches
zth::List< T > Class Template Reference

#include <list.h>

Classes

class  Iterator
 

Public Types

typedef T type
 
typedef Listable elem_type
 
typedef elem_type::user_type user_type
 
typedef Iterator< false > iterator
 
typedef Iterator< true > cyclic_iterator
 

Public Member Functions

constexpr List () noexcept
 
 ~List () noexcept
 
typeback () const noexcept
 
user_type const & user_back () const noexcept
 
user_typeuser_back () noexcept
 
iterator push_back (elem_type &elem) noexcept
 
user_type pop_back () noexcept
 
typefront () const noexcept
 
user_type const & user_front () const noexcept
 
user_typeuser_front () noexcept
 
iterator push_front (elem_type &elem) noexcept
 
user_type pop_front () noexcept
 
bool empty () const noexcept
 
void clear () noexcept
 
iterator begin () const noexcept
 
cyclic_iterator cyclic (elem_type &start) const noexcept
 
iterator end () const noexcept
 
bool contains (elem_type const &elem) const noexcept
 
size_t size () const noexcept
 
iterator insert (iterator const &pos, elem_type &elem) noexcept
 
iterator erase (iterator const &pos) noexcept
 
user_type erase (elem_type &elem) noexcept
 
void rotate (elem_type &elem) noexcept
 

Detailed Description

template<typename T = Listable>
class zth::List< T >

Definition at line 92 of file list.h.

Member Typedef Documentation

◆ cyclic_iterator

template<typename T = Listable>
typedef Iterator<true> zth::List< T >::cyclic_iterator

Definition at line 215 of file list.h.

◆ elem_type

template<typename T = Listable>
typedef Listable zth::List< T >::elem_type

Definition at line 97 of file list.h.

◆ iterator

template<typename T = Listable>
typedef Iterator<false> zth::List< T >::iterator

Definition at line 214 of file list.h.

◆ type

template<typename T = Listable>
typedef T zth::List< T >::type

Definition at line 96 of file list.h.

◆ user_type

template<typename T = Listable>
typedef elem_type::user_type zth::List< T >::user_type

Definition at line 98 of file list.h.

Constructor & Destructor Documentation

◆ List()

template<typename T = Listable>
constexpr zth::List< T >::List ( )
inlineconstexprnoexcept

Definition at line 217 of file list.h.

◆ ~List()

template<typename T = Listable>
zth::List< T >::~List ( )
inlinenoexcept

Definition at line 222 of file list.h.

Member Function Documentation

◆ back()

template<typename T = Listable>
type & zth::List< T >::back ( ) const
inlinenoexcept

Definition at line 228 of file list.h.

◆ begin()

template<typename T = Listable>
iterator zth::List< T >::begin ( ) const
inlinenoexcept

Definition at line 359 of file list.h.

◆ clear()

template<typename T = Listable>
void zth::List< T >::clear ( )
inlinenoexcept

Definition at line 350 of file list.h.

◆ contains()

template<typename T = Listable>
bool zth::List< T >::contains ( elem_type const &  elem) const
inlinenoexcept

Definition at line 375 of file list.h.

◆ cyclic()

template<typename T = Listable>
cyclic_iterator zth::List< T >::cyclic ( elem_type start) const
inlinenoexcept

Definition at line 364 of file list.h.

◆ empty()

template<typename T = Listable>
bool zth::List< T >::empty ( ) const
inlinenoexcept

Definition at line 344 of file list.h.

◆ end()

template<typename T = Listable>
iterator zth::List< T >::end ( ) const
inlinenoexcept

Definition at line 370 of file list.h.

◆ erase() [1/2]

template<typename T = Listable>
user_type zth::List< T >::erase ( elem_type elem)
inlinenoexcept

Definition at line 425 of file list.h.

◆ erase() [2/2]

template<typename T = Listable>
iterator zth::List< T >::erase ( iterator const &  pos)
inlinenoexcept

Definition at line 409 of file list.h.

◆ front()

template<typename T = Listable>
type & zth::List< T >::front ( ) const
inlinenoexcept

Definition at line 287 of file list.h.

◆ insert()

template<typename T = Listable>
iterator zth::List< T >::insert ( iterator const &  pos,
elem_type elem 
)
inlinenoexcept

Definition at line 391 of file list.h.

◆ pop_back()

template<typename T = Listable>
user_type zth::List< T >::pop_back ( )
inlinenoexcept

Definition at line 265 of file list.h.

◆ pop_front()

template<typename T = Listable>
user_type zth::List< T >::pop_front ( )
inlinenoexcept

Definition at line 322 of file list.h.

◆ push_back()

template<typename T = Listable>
iterator zth::List< T >::push_back ( elem_type elem)
inlinenoexcept

Definition at line 246 of file list.h.

◆ push_front()

template<typename T = Listable>
iterator zth::List< T >::push_front ( elem_type elem)
inlinenoexcept

Definition at line 305 of file list.h.

◆ rotate()

template<typename T = Listable>
void zth::List< T >::rotate ( elem_type elem)
inlinenoexcept

Definition at line 441 of file list.h.

◆ size()

template<typename T = Listable>
size_t zth::List< T >::size ( ) const
inlinenoexcept

Definition at line 383 of file list.h.

◆ user_back() [1/2]

template<typename T = Listable>
user_type const & zth::List< T >::user_back ( ) const
inlinenoexcept

Definition at line 234 of file list.h.

◆ user_back() [2/2]

template<typename T = Listable>
user_type & zth::List< T >::user_back ( )
inlinenoexcept

Definition at line 240 of file list.h.

◆ user_front() [1/2]

template<typename T = Listable>
user_type const & zth::List< T >::user_front ( ) const
inlinenoexcept

Definition at line 293 of file list.h.

◆ user_front() [2/2]

template<typename T = Listable>
user_type & zth::List< T >::user_front ( )
inlinenoexcept

Definition at line 299 of file list.h.


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