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 90 of file list.h.

Member Typedef Documentation

◆ cyclic_iterator

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

Definition at line 213 of file list.h.

◆ elem_type

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

Definition at line 95 of file list.h.

◆ iterator

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

Definition at line 212 of file list.h.

◆ type

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

Definition at line 94 of file list.h.

◆ user_type

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

Definition at line 96 of file list.h.

Constructor & Destructor Documentation

◆ List()

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

Definition at line 215 of file list.h.

◆ ~List()

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

Definition at line 220 of file list.h.

Member Function Documentation

◆ back()

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

Definition at line 226 of file list.h.

◆ begin()

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

Definition at line 357 of file list.h.

◆ clear()

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

Definition at line 348 of file list.h.

◆ contains()

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

Definition at line 373 of file list.h.

◆ cyclic()

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

Definition at line 362 of file list.h.

◆ empty()

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

Definition at line 342 of file list.h.

◆ end()

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

Definition at line 368 of file list.h.

◆ erase() [1/2]

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

Definition at line 423 of file list.h.

◆ erase() [2/2]

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

Definition at line 407 of file list.h.

◆ front()

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

Definition at line 285 of file list.h.

◆ insert()

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

Definition at line 389 of file list.h.

◆ pop_back()

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

Definition at line 263 of file list.h.

◆ pop_front()

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

Definition at line 320 of file list.h.

◆ push_back()

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

Definition at line 244 of file list.h.

◆ push_front()

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

Definition at line 303 of file list.h.

◆ rotate()

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

Definition at line 439 of file list.h.

◆ size()

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

Definition at line 381 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 232 of file list.h.

◆ user_back() [2/2]

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

Definition at line 238 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 291 of file list.h.

◆ user_front() [2/2]

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

Definition at line 297 of file list.h.


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