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

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

Public Member Functions

 term_appl_iterator (const term_appl_iterator &other)
 The copy constructor.
 
term_appl_iteratoroperator= (const term_appl_iterator &other)
 The assignment operator.
 
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.
 
bool operator!= (const term_appl_iterator &other) const
 Inequality of iterators.
 
bool operator< (const term_appl_iterator &other) const
 Comparison of iterators.
 
bool operator<= (const term_appl_iterator &other) const
 Comparison of iterators.
 
bool operator> (const term_appl_iterator &other) const
 Comparison of iterators.
 
bool operator>= (const term_appl_iterator &other) const
 Comparison of iterators.
 

Protected Member Functions

 term_appl_iterator (const Term *t)
 Constructor.
 

Protected Attributes

const Term * m_term
 

Friends

class aterm
 
template<class Derived , class Base >
term_appl_iterator< Derived > detail::aterm_appl_iterator_cast (term_appl_iterator< Base > a, typename std::enable_if< std::is_base_of< aterm, Base >::value &&std::is_base_of< aterm, Derived >::value >::type *)
 

Detailed Description

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

Iterator for term_appl.

Definition at line 22 of file aterm_appl_iterator.h.

Member Typedef Documentation

◆ difference_type

template<typename Term >
typedef ptrdiff_t atermpp::term_appl_iterator< Term >::difference_type

Definition at line 47 of file aterm_appl_iterator.h.

◆ iterator_category

template<typename Term >
typedef std::random_access_iterator_tag atermpp::term_appl_iterator< Term >::iterator_category

Definition at line 48 of file aterm_appl_iterator.h.

◆ pointer

template<typename Term >
typedef const Term* atermpp::term_appl_iterator< Term >::pointer

Definition at line 46 of file aterm_appl_iterator.h.

◆ reference

template<typename Term >
typedef const Term& atermpp::term_appl_iterator< Term >::reference

Definition at line 45 of file aterm_appl_iterator.h.

◆ value_type

template<typename Term >
typedef Term atermpp::term_appl_iterator< Term >::value_type

Definition at line 44 of file aterm_appl_iterator.h.

Constructor & Destructor Documentation

◆ term_appl_iterator() [1/2]

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 39 of file aterm_appl_iterator.h.

◆ term_appl_iterator() [2/2]

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

The copy constructor.

Parameters
otherThe iterator that is copy constructed.

Definition at line 52 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 166 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

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 183 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 67 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 141 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 89 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 97 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 124 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 158 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 149 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 106 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 114 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 133 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 74 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

Comparison of iterators.

Parameters
otherThe iterator with which this iterator is compared.
Returns
true if the pointer to this termterm is smaller than the other pointer.

Definition at line 191 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

Comparison of iterators.

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

Definition at line 199 of file aterm_appl_iterator.h.

◆ operator=()

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

The assignment operator.

Parameters
otherThe term to be assigned.
Returns
A reference to the assigned iterator.

Definition at line 59 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 175 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

Comparison of iterators.

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

Definition at line 207 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

Comparison of iterators.

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

Definition at line 215 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 82 of file aterm_appl_iterator.h.

Friends And Related Symbol Documentation

◆ aterm

template<typename Term >
friend class aterm
friend

Definition at line 24 of file aterm_appl_iterator.h.

◆ detail::aterm_appl_iterator_cast

template<typename Term >
template<class Derived , class Base >
term_appl_iterator< Derived > detail::aterm_appl_iterator_cast ( term_appl_iterator< Base >  a,
typename std::enable_if< std::is_base_of< aterm, Base >::value &&std::is_base_of< aterm, Derived >::value >::type *   
)
friend

Member Data Documentation

◆ m_term

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

Definition at line 35 of file aterm_appl_iterator.h.


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