VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc::list_iterator_base< NodeType, ListType > Class Template Reference

Base class for iterators on the vlc::list's vlc_list wrapper. More...

#include <vlc_list.hpp>

Collaboration diagram for vlc::list_iterator_base< NodeType, ListType >:
[legend]

Public Types

using iterator_category = std::bidirectional_iterator_tag
 
using value_type = std::conditional_t< is_const, const NodeType, NodeType >
 
using pointer = std::conditional_t< is_const, const NodeType *, NodeType * >
 
using reference = std::conditional_t< is_const, const NodeType &, NodeType & >
 
using difference_type = std::ptrdiff_t
 
using iterator_type = list_iterator_base< NodeType, ListType >
 

Public Member Functions

 list_iterator_base (ListType &list, vlc_list NodeType::*node_ptr)
 
reference operator* () const
 
pointer operator-> () const
 
iterator_type operator++ ()
 
iterator_type operator++ (int)
 
iterator_typeoperator-- ()
 
iterator_type operator-- (int)
 

Protected Member Functions

constexpr std::ptrdiff_t offset () const
 

Protected Attributes

ListType * _current
 
ListType * _next
 
ListType * _prev
 
vlc_list NodeType::* _node_ptr
 

Static Protected Attributes

static constexpr bool is_const = std::is_const<ListType>::value
 

Friends

bool operator== (const iterator_type &a, const iterator_type &b)
 
bool operator!= (const iterator_type &a, const iterator_type &b)
 

Detailed Description

template<typename NodeType, typename ListType>
class vlc::list_iterator_base< NodeType, ListType >

Base class for iterators on the vlc::list's vlc_list wrapper.

The base class c

Template Parameters
NodeTypethe type of each node from the list
ListTypeeither vlc_list or const vlc_list

Member Typedef Documentation

◆ difference_type

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::iterator_category = std::bidirectional_iterator_tag

◆ iterator_type

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::iterator_type = list_iterator_base<NodeType, ListType>

◆ pointer

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::pointer = std::conditional_t<is_const, const NodeType*, NodeType*>

◆ reference

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::reference = std::conditional_t<is_const, const NodeType&, NodeType&>

◆ value_type

template<typename NodeType , typename ListType >
using vlc::list_iterator_base< NodeType, ListType >::value_type = std::conditional_t<is_const, const NodeType, NodeType>

Constructor & Destructor Documentation

◆ list_iterator_base()

template<typename NodeType , typename ListType >
vlc::list_iterator_base< NodeType, ListType >::list_iterator_base ( ListType &  list,
vlc_list NodeType::*  node_ptr 
)
inline

Member Function Documentation

◆ offset()

template<typename NodeType , typename ListType >
constexpr std::ptrdiff_t vlc::list_iterator_base< NodeType, ListType >::offset ( ) const
inlineconstexprprotected

◆ operator*()

template<typename NodeType , typename ListType >
reference vlc::list_iterator_base< NodeType, ListType >::operator* ( ) const
inline

◆ operator++() [1/2]

◆ operator++() [2/2]

template<typename NodeType , typename ListType >
iterator_type vlc::list_iterator_base< NodeType, ListType >::operator++ ( int  )
inline

◆ operator--() [1/2]

◆ operator--() [2/2]

template<typename NodeType , typename ListType >
iterator_type vlc::list_iterator_base< NodeType, ListType >::operator-- ( int  )
inline

◆ operator->()

template<typename NodeType , typename ListType >
pointer vlc::list_iterator_base< NodeType, ListType >::operator-> ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!=

template<typename NodeType , typename ListType >
bool operator!= ( const iterator_type a,
const iterator_type b 
)
friend

◆ operator==

template<typename NodeType , typename ListType >
bool operator== ( const iterator_type a,
const iterator_type b 
)
friend

Field Documentation

◆ _current

◆ _next

◆ _node_ptr

◆ _prev

◆ is_const

template<typename NodeType , typename ListType >
constexpr bool vlc::list_iterator_base< NodeType, ListType >::is_const = std::is_const<ListType>::value
staticconstexprprotected

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