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

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

Public Member Functions

 iterator_or_null ()
 
 iterator_or_null (std::nullptr_t)
 
 iterator_or_null (const iterator &other)
 
bool is_null () const
 
bool operator== (const T *const other) const
 
bool operator!= (const T *const other) const
 
void operator= (std::nullptr_t)
 
T & operator* () const
 
bool operator== (const const_iterator &other) const
 
bool operator!= (const const_iterator &other) const
 
- Public Member Functions inherited from mcrl2::lts::detail::simple_list< T >::iterator
 iterator ()=default
 
 iterator (const iterator &other)=default
 
iteratoroperator= (const iterator &other)=default
 
iteratoroperator++ ()
 
iteratoroperator-- ()
 
T & operator* () const
 
T * operator-> () const
 
bool operator== (const const_iterator &other) const
 
bool operator!= (const const_iterator &other) 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_iteratoroperator= (const const_iterator &other)=default
 
const_iteratoroperator++ ()
 
const_iteratoroperator-- ()
 
const T & operator* () const
 
const T * operator-> () const
 
bool operator== (const const_iterator &other) const
 
bool operator!= (const const_iterator &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
entryptr
 

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 429 of file simple_list.h.

Member Typedef Documentation

◆ difference_type

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

Definition at line 395 of file simple_list.h.

◆ iterator_category

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

Definition at line 396 of file simple_list.h.

◆ pointer

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

Definition at line 393 of file simple_list.h.

◆ reference

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

Definition at line 394 of file simple_list.h.

◆ value_type

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

Definition at line 392 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 442 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 444 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 449 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 451 of file simple_list.h.

◆ operator!=() [1/2]

template<class T >
bool mcrl2::lts::detail::simple_list< T >::const_iterator::operator!= ( const const_iterator other) const
inline

Definition at line 398 of file simple_list.h.

◆ operator!=() [2/2]

template<class T >
bool mcrl2::lts::detail::simple_list< T >::iterator_or_null::operator!= ( const T *const  other) const
inline

Definition at line 459 of file simple_list.h.

◆ operator*()

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

Definition at line 414 of file simple_list.h.

◆ operator=()

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

Definition at line 464 of file simple_list.h.

◆ operator==() [1/2]

template<class T >
bool mcrl2::lts::detail::simple_list< T >::const_iterator::operator== ( const const_iterator other) const
inline

Definition at line 397 of file simple_list.h.

◆ operator==() [2/2]

template<class T >
bool mcrl2::lts::detail::simple_list< T >::iterator_or_null::operator== ( const T *const  other) const
inline

Definition at line 453 of file simple_list.h.


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