mCRL2
Loading...
Searching...
No Matches
mcrl2::lts::detail::simple_list< T >::iterator_or_null Class Reference

class that stores either an iterator or a null value More...

#include <simple_list.h>

Inheritance diagram for mcrl2::lts::detail::simple_list< T >::iterator_or_null:
mcrl2::lts::detail::simple_list< T >::iterator mcrl2::lts::detail::simple_list< T >::const_iterator

Public Types

using value_type = T
 
using pointer = T *
 
using reference = T &
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::forward_iterator_tag
 
- Public Types inherited from mcrl2::lts::detail::simple_list< T >::iterator
using value_type = T
 
using pointer = T *
 
using reference = T &
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::forward_iterator_tag
 
- Public Types inherited from mcrl2::lts::detail::simple_list< T >::const_iterator
using value_type = T
 
using pointer = T *
 
using reference = T &
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 iterator_or_null ()
 
 iterator_or_null (std::nullptr_t)
 
 iterator_or_null (const iterator &other)
 
bool is_null () const
 
iterator_or_null & operator= (std::nullptr_t)
 
T & operator* () const
 
- Public Member Functions inherited from mcrl2::lts::detail::simple_list< T >::iterator
 iterator ()=default
 
 iterator (const iterator &other)=default
 
iterator & operator= (const iterator &other)=default
 
iterator & operator++ ()
 
iterator & operator-- ()
 
iterator operator++ (int)
 
iterator operator-- (int)
 
T & operator* () const
 
T * operator-> () const
 
- Public Member Functions inherited from mcrl2::lts::detail::simple_list< T >::const_iterator
 const_iterator ()=default
 
 const_iterator (const const_iterator &other)=default
 
const_iterator & operator= (const const_iterator &other)=default
 
const_iterator & operator++ ()
 
const_iterator & operator-- ()
 
const_iterator operator++ (int)
 
const_iterator operator-- (int)
 
const T & operator* () const
 
const T * operator-> () const
 
bool operator== (const const_iterator &other) const
 
bool operator== (const T *const other) const
 

Additional Inherited Members

- Protected Member Functions inherited from mcrl2::lts::detail::simple_list< T >::iterator
 iterator (entry *const new_ptr)
 
- Protected Member Functions inherited from mcrl2::lts::detail::simple_list< T >::const_iterator
 const_iterator (const entry *const new_ptr)
 
- Protected Attributes inherited from mcrl2::lts::detail::simple_list< T >::const_iterator
entry * ptr
 

Detailed Description

template<class T>
class mcrl2::lts::detail::simple_list< T >::iterator_or_null

class that stores either an iterator or a null value

We cannot use C++14's "null forward iterators", as they are not guaranteed to compare unequal to valid iterators. We also need to compare null iterators with non-null ones.

Definition at line 464 of file simple_list.h.

Member Typedef Documentation

◆ difference_type

template<class T >
using mcrl2::lts::detail::simple_list< T >::const_iterator::difference_type = std::ptrdiff_t

Definition at line 418 of file simple_list.h.

◆ iterator_category

template<class T >
using mcrl2::lts::detail::simple_list< T >::const_iterator::iterator_category = std::forward_iterator_tag

Definition at line 419 of file simple_list.h.

◆ pointer

template<class T >
using mcrl2::lts::detail::simple_list< T >::const_iterator::pointer = T*

Definition at line 416 of file simple_list.h.

◆ reference

template<class T >
using mcrl2::lts::detail::simple_list< T >::const_iterator::reference = T&

Definition at line 417 of file simple_list.h.

◆ value_type

template<class T >
using mcrl2::lts::detail::simple_list< T >::const_iterator::value_type = T

Definition at line 415 of file simple_list.h.

Constructor & Destructor Documentation

◆ iterator_or_null() [1/3]

template<class T >
mcrl2::lts::detail::simple_list< T >::iterator_or_null::iterator_or_null ( )
inline

Definition at line 475 of file simple_list.h.

◆ iterator_or_null() [2/3]

template<class T >
mcrl2::lts::detail::simple_list< T >::iterator_or_null::iterator_or_null ( std::nullptr_t  )
inline

Definition at line 477 of file simple_list.h.

◆ iterator_or_null() [3/3]

template<class T >
mcrl2::lts::detail::simple_list< T >::iterator_or_null::iterator_or_null ( const iterator &  other)
inline

Definition at line 482 of file simple_list.h.

Member Function Documentation

◆ is_null()

template<class T >
bool mcrl2::lts::detail::simple_list< T >::iterator_or_null::is_null ( ) const
inline

Definition at line 484 of file simple_list.h.

◆ operator*()

template<class T >
T & mcrl2::lts::detail::simple_list< T >::iterator::operator* ( ) const
inline

Definition at line 449 of file simple_list.h.

◆ operator=()

template<class T >
iterator_or_null & mcrl2::lts::detail::simple_list< T >::iterator_or_null::operator= ( std::nullptr_t  )
inline

Definition at line 486 of file simple_list.h.


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