Include file:
#include "mcrl2/atermpp/aterm.h
atermpp::
unprotected_aterm
¶An unprotected term does not change the reference count of the shared term when it is copied or moved.
atermpp::unprotected_aterm::
m_term
¶friend detail::_aterm * atermpp::unprotected_aterm::detail::address
defined
() constReturns true if this term is not equal to the term assigned by the default constructor of aterms, term_appl<T>’s and aterm_int.
The default constructor of a term_list<T> is the empty list, on which the operator defined yields true. This operation is more efficient than comparing the current term with an aterm(), term_appl<T>() or an aterm_int().
Returns: A boolean indicating whether this term equals the default constructor.
function
() constYields the function symbol in an aterm.
Returns: The function symbol of the term, which can also be an AS_EMPTY_LIST, AS_INT and AS_LIST.
This is for internal use only.
operator!=
(const unprotected_aterm &t) const¶Inequality operator on two unprotected aterms.
See note at the == operator. This operator requires constant time.
Parameters:
t A term to which the current term is compared.
Returns: false iff t is equal to the current term.
operator<
(const unprotected_aterm &t) const¶Comparison operator for two unprotected aterms.
This operator requires constant time. It compares the addresses where terms are stored. That means that the outcome of this operator is only stable as long as aterms are not garbage collected.
Parameters:
t A term to which the current term is compared.
Returns: True iff the current term is smaller than the argument.
operator<=
(const unprotected_aterm &t) const¶Comparison operator for two unprotected aterms.
This operator requires constant time. See note at the operator <.
Parameters:
t A term to which the current term is compared.
Returns: True iff the current term is smaller or equal than the argument.
operator==
(const unprotected_aterm &t) const¶Comparison operator.
Terms are stored in a maximally shared way. This means that this equality operator can be calculated in constant time.
Returns: true iff t is equal to the current term.
operator>
(const unprotected_aterm &t) const¶Comparison operator for two unprotected aterms.
This operator requires constant time. See note at the operator <.
Parameters:
t A term to which the current term is compared.
Returns: True iff the current term is larger than the argument.
operator>=
(const unprotected_aterm &t) const¶Comparison operator for two unprotected aterms.
This operator requires constant time. See note at the operator <.
Parameters:
t A term to which the current term is compared.
Returns: True iff the current term is larger or equalthan the argument.
swap
(unprotected_aterm &t) noexcept¶Swaps this term with its argument.
This operation is more efficient than exchanging terms by an assignment, as swapping does not require to change the protection of terms.
Parameters:
t The term with which this term is swapped.
type_is_appl
() const noexcept¶Dynamic check whether the term is an aterm_appl.
Returns: True iff this term is an term_appl.
This function has constant complexity. It is defined as !type_is_int() && !type_is_list().
type_is_int
() const noexcept¶Dynamic check whether the term is an aterm_int.
Returns: True iff this term has internal structure of an aterm_int.
This function has constant complexity.
type_is_list
() const noexcept¶Dynamic check whether the term is an aterm_list.
Returns: True iff this term has the structure of an term_list
This function has constant complexity.
unprotected_aterm
() noexcept¶Default constuctor.
unprotected_aterm
(const detail::_aterm *term) noexcept¶Constructor.
Parameters:
term The term from which the new term is constructed.