atermpp::term_appl

Include file:

#include "mcrl2/atermpp/aterm_appl.h
class atermpp::term_appl

Public types

type const_iterator

typedef for term_appl_iterator< Term >

Const iterator used to iterate through an term_appl.

type const_reference

typedef for const Term

Const reference to T.

type difference_type

typedef for ptrdiff_t

A signed integral type.

type iterator

typedef for term_appl_iterator< Term >

Iterator used to iterate through an term_appl.

type pointer

typedef for Term *

Pointer to T.

type reference

typedef for Term &

Reference to T.

type size_type

typedef for std::size_t

An unsigned integral type.

type value_type

typedef for Term

The type of object, T stored in the term_appl.

Protected member functions

term_appl(detail::_term_appl *t)

Constructor.

Parameters:

  • t A pointer internal data structure from which the term is constructed.

This function is explicitly protected such that is not used in common code.

term_appl(const aterm &t)

Explicit constructor from an aterm.

Parameters:

  • t The aterm from which the term is constructed.

This function is explicitly protected, to avoid its use in general code.

Public member functions

const_iterator begin() const

Returns an iterator pointing to the first argument.

Returns: An iterator pointing to the first argument.

bool empty() const

Returns true if the term has no arguments.

Returns: True if this term has no arguments.

const_iterator end() const

Returns a const_iterator pointing past the last argument.

Returns: A const_iterator pointing past the last argument.

const function_symbol &function() const

Returns the function symbol belonging to an aterm_appl.

Returns: The function symbol of this term.

constexpr size_type max_size() const

Returns the largest possible number of arguments.

Returns: The largest possible number of arguments.

term_appl &operator=(const term_appl &other) noexcept = default
term_appl &operator=(term_appl &&other) noexcept = default
const Term &operator[](const size_type i) const

Returns the i-th argument.

Parameters:

  • i A positive integer.

Returns: The argument with the given index.

size_type size() const

Returns the number of arguments of this term.

Returns: The number of arguments of this term.

term_appl()

Default constructor.

term_appl(const term_appl &other) noexcept = default

This class has user-declared copy constructor so declare default copy and move operators.

term_appl(term_appl &&other) noexcept = default
term_appl(const function_symbol &sym, ForwardIterator begin, ForwardIterator end)

The iterator range is traversed more than once. If only one traversal is required use term_appl with a TermConverter argument. But this function is substantially less efficient. The length of the iterator range should must match the arity of the function symbol.

Parameters:

  • sym A function symbol.
  • begin The start of a range of elements.
  • end The end of a range of elements.
term_appl(const function_symbol &sym, InputIterator begin, InputIterator end)

The given iterator is traversed only once. So it can be used with an input iterator. This means that the TermConverter is applied exactly once to each element. The length of the iterator range must be equal to the arity of the function symbol.

Parameters:

  • sym A function symbol.
  • begin The start of a range of elements.
  • end The end of a range of elements.
term_appl(const function_symbol &sym, InputIterator begin, InputIterator end, TermConverter converter)

The given iterator is traversed only once. So it can be used with an input iterator. This means that the TermConverter is applied exactly once to each element. The length of the iterator range must be equal to the arity of the function symbol.

Parameters:

  • sym A function symbol.
  • begin The start of a range of elements.
  • end The end of a range of elements.
  • converter An class or lambda term containing an operator Term operator()(const Term& t) which is applied to each each element in the iterator range before it becomes an argument of this term.
term_appl(const function_symbol &sym)

Constructor.

Parameters:

  • sym A function symbol.
term_appl(const function_symbol &symbol, const Terms&... arguments)

Constructor for n-arity function application.

Parameters:

  • symbol A function symbol.
  • arguments The arguments of the function application.