mCRL2
Loading...
Searching...
No Matches
atermpp::term_appl_iterator< Term > Class Template Reference

Iterator for term_appl. More...

#include <aterm_appl_iterator.h>

Public Types

using value_type = Term
 
using reference = const Term &
 
using pointer = const Term *
 
using difference_type = ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 

Public Member Functions

const Term & operator* () const
 The dereference operator.
 
const Term * operator-> () const
 Dereference the current iterator.
 
const Term & operator[] (difference_type n) const
 The dereference operator.
 
term_appl_iteratoroperator++ ()
 Prefix increment.
 
term_appl_iterator operator++ (int)
 Postfix increment.
 
term_appl_iteratoroperator-- ()
 Prefix decrement.
 
term_appl_iterator operator-- (int)
 Post decrement an iterator.
 
term_appl_iteratoroperator+= (difference_type n)
 Increase the iterator with n steps.
 
term_appl_iteratoroperator-= (difference_type n)
 Decrease the iterator with n steps.
 
term_appl_iterator operator+ (ptrdiff_t n) const
 Increase by a constant value.
 
term_appl_iterator operator- (ptrdiff_t n) const
 Decrease by a constant value.
 
ptrdiff_t operator- (const term_appl_iterator &other) const
 The negative distance from this to the other iterator.
 
ptrdiff_t distance_to (const term_appl_iterator &other) const
 Provide the distance to the other iterator.
 
bool operator== (const term_appl_iterator &other) const
 Equality of iterators.
 
std::strong_ordering operator<=> (const term_appl_iterator &other) const
 Inequality of iterators.
 

Protected Member Functions

 term_appl_iterator (const Term *t)
 Constructor.
 

Protected Attributes

const Term * m_term
 

Friends

class aterm
 
template<IsATerm Derived, IsATerm Base>
requires std::is_base_of_v<aterm, Base> && std::is_base_of_v<aterm, Derived>
term_appl_iterator< Derived > detail::aterm_appl_iterator_cast (term_appl_iterator< Base > a)
 

Detailed Description

template<typename Term>
class atermpp::term_appl_iterator< Term >

Iterator for term_appl.

Definition at line 24 of file aterm_appl_iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename Term >
using atermpp::term_appl_iterator< Term >::difference_type = ptrdiff_t

Definition at line 46 of file aterm_appl_iterator.h.

◆ iterator_category

template<typename Term >
using atermpp::term_appl_iterator< Term >::iterator_category = std::random_access_iterator_tag

Definition at line 47 of file aterm_appl_iterator.h.

◆ pointer

template<typename Term >
using atermpp::term_appl_iterator< Term >::pointer = const Term*

Definition at line 45 of file aterm_appl_iterator.h.

◆ reference

template<typename Term >
using atermpp::term_appl_iterator< Term >::reference = const Term&

Definition at line 44 of file aterm_appl_iterator.h.

◆ value_type

template<typename Term >
using atermpp::term_appl_iterator< Term >::value_type = Term

Definition at line 43 of file aterm_appl_iterator.h.

Constructor & Destructor Documentation

◆ term_appl_iterator()

template<typename Term >
atermpp::term_appl_iterator< Term >::term_appl_iterator ( const Term *  t)
inlineprotected

Constructor.

Parameters
tA pointer of an array of terms over which the iterator will range.

Definition at line 38 of file aterm_appl_iterator.h.

Member Function Documentation

◆ distance_to()

template<typename Term >
ptrdiff_t atermpp::term_appl_iterator< Term >::distance_to ( const term_appl_iterator< Term > &  other) const
inline

Provide the distance to the other iterator.

Parameters
otherthe other iterator.
Returns
the distance from other to this iterator.

Definition at line 150 of file aterm_appl_iterator.h.

◆ operator*()

template<typename Term >
const Term & atermpp::term_appl_iterator< Term >::operator* ( ) const
inline

The dereference operator.

Returns
The dereferenced term.

Definition at line 51 of file aterm_appl_iterator.h.

◆ operator+()

template<typename Term >
term_appl_iterator atermpp::term_appl_iterator< Term >::operator+ ( ptrdiff_t  n) const
inline

Increase by a constant value.

Returns
The iterator incremented by n.

Definition at line 125 of file aterm_appl_iterator.h.

◆ operator++() [1/2]

template<typename Term >
term_appl_iterator & atermpp::term_appl_iterator< Term >::operator++ ( )
inline

Prefix increment.

Returns
The iterator after it is incremented.

Definition at line 73 of file aterm_appl_iterator.h.

◆ operator++() [2/2]

template<typename Term >
term_appl_iterator atermpp::term_appl_iterator< Term >::operator++ ( int  )
inline

Postfix increment.

Returns
The iterator before incrementing it.

Definition at line 81 of file aterm_appl_iterator.h.

◆ operator+=()

template<typename Term >
term_appl_iterator & atermpp::term_appl_iterator< Term >::operator+= ( difference_type  n)
inline

Increase the iterator with n steps.

Parameters
nThe difference with which the iterator is increased.
Returns
The increased iterator.

Definition at line 108 of file aterm_appl_iterator.h.

◆ operator-() [1/2]

template<typename Term >
ptrdiff_t atermpp::term_appl_iterator< Term >::operator- ( const term_appl_iterator< Term > &  other) const
inline

The negative distance from this to the other iterator.

Parameters
otherthe other iterator.
Returns
The negative distance: this-other.

Definition at line 142 of file aterm_appl_iterator.h.

◆ operator-() [2/2]

template<typename Term >
term_appl_iterator atermpp::term_appl_iterator< Term >::operator- ( ptrdiff_t  n) const
inline

Decrease by a constant value.

Returns
The iterator decremented by n.

Definition at line 133 of file aterm_appl_iterator.h.

◆ operator--() [1/2]

template<typename Term >
term_appl_iterator & atermpp::term_appl_iterator< Term >::operator-- ( )
inline

Prefix decrement.

Returns
The iterator after decrementing it.

Definition at line 90 of file aterm_appl_iterator.h.

◆ operator--() [2/2]

template<typename Term >
term_appl_iterator atermpp::term_appl_iterator< Term >::operator-- ( int  )
inline

Post decrement an iterator.

Returns
The iterator before decrementing it.

Definition at line 98 of file aterm_appl_iterator.h.

◆ operator-=()

template<typename Term >
term_appl_iterator & atermpp::term_appl_iterator< Term >::operator-= ( difference_type  n)
inline

Decrease the iterator with n steps.

Parameters
na difference with which the iterator is decreased.
Returns
The decreased iterator.

Definition at line 117 of file aterm_appl_iterator.h.

◆ operator->()

template<typename Term >
const Term * atermpp::term_appl_iterator< Term >::operator-> ( ) const
inline

Dereference the current iterator.

Returns
The dereference term.

Definition at line 58 of file aterm_appl_iterator.h.

◆ operator<=>()

template<typename Term >
std::strong_ordering atermpp::term_appl_iterator< Term >::operator<=> ( const term_appl_iterator< Term > &  other) const
inline

Inequality of iterators.

Parameters
otherThe iterator with which this iterator is compared.
Returns
true if the iterators do not point to the same term_appl.

Definition at line 167 of file aterm_appl_iterator.h.

◆ operator==()

template<typename Term >
bool atermpp::term_appl_iterator< Term >::operator== ( const term_appl_iterator< Term > &  other) const
inline

Equality of iterators.

Parameters
otherThe iterator with which this iterator is compared.
Returns
true if the iterators point to the same term_list.

Definition at line 159 of file aterm_appl_iterator.h.

◆ operator[]()

template<typename Term >
const Term & atermpp::term_appl_iterator< Term >::operator[] ( difference_type  n) const
inline

The dereference operator.

Parameters
nThe index of the element to be dereferenced.
Returns
The dereferenced term.

Definition at line 66 of file aterm_appl_iterator.h.

Friends And Related Symbol Documentation

◆ aterm

template<typename Term >
friend class aterm
friend

Definition at line 26 of file aterm_appl_iterator.h.

◆ detail::aterm_appl_iterator_cast

template<typename Term >
template<IsATerm Derived, IsATerm Base>
requires std::is_base_of_v<aterm, Base> && std::is_base_of_v<aterm, Derived>
term_appl_iterator< Derived > detail::aterm_appl_iterator_cast ( term_appl_iterator< Base >  a)
friend

Member Data Documentation

◆ m_term

template<typename Term >
const Term* atermpp::term_appl_iterator< Term >::m_term
protected

Definition at line 34 of file aterm_appl_iterator.h.


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