mCRL2
Loading...
Searching...
No Matches
atermpp::unprotected_aterm_core Class Reference

An unprotected term does not change the reference count of the shared term when it is copied or moved. More...

#include <aterm_core.h>

Inheritance diagram for atermpp::unprotected_aterm_core:
atermpp::aterm_core atermpp::detail::reference_aterm< T, typename std::enable_if< std::is_base_of< aterm_core, T >::value >::type > atermpp::aterm atermpp::term_list< variable_with_a_rational_factor > atermpp::term_list< variable > atermpp::term_list< data_expression > atermpp::term_list< action_label > atermpp::term_list< lps::state > atermpp::term_list< match_tree_list > atermpp::term_list< match_tree_list_list > atermpp::term_list< assignment > atermpp::aterm_int atermpp::aterm_string atermpp::detail::shared_subset< T >::bdd_node atermpp::term_balanced_tree< Term > atermpp::term_list< Term > mcrl2::action_formulas::action_formula mcrl2::data::alias mcrl2::data::assignment_expression mcrl2::data::binder_type mcrl2::data::container_type mcrl2::data::data_equation mcrl2::data::data_expression mcrl2::data::detail::match_tree mcrl2::data::detail::variable_or_number mcrl2::data::detail::variable_with_a_rational_factor mcrl2::data::linear_inequality mcrl2::data::sort_expression mcrl2::data::structured_sort_constructor mcrl2::data::structured_sort_constructor_argument mcrl2::data::untyped_data_parameter mcrl2::lps::multi_action mcrl2::lps::process_initializer mcrl2::lps::stochastic_distribution mcrl2::pbes_system::fixpoint_symbol mcrl2::pbes_system::pbes_expression mcrl2::pbes_system::propositional_variable mcrl2::pres_system::pres_expression mcrl2::process::action_label mcrl2::process::action_name_multiset mcrl2::process::communication_expression mcrl2::process::process_equation mcrl2::process::process_expression mcrl2::process::process_identifier mcrl2::process::rename_expression mcrl2::process::untyped_multi_action mcrl2::regular_formulas::regular_formula mcrl2::state_formulas::state_formula

Public Member Functions

 unprotected_aterm_core () noexcept
 Default constuctor.
 
 unprotected_aterm_core (const detail::_aterm *term) noexcept
 Constructor.
 
bool type_is_appl () const noexcept
 Dynamic check whether the term is an aterm.
 
bool type_is_int () const noexcept
 Dynamic check whether the term is an aterm_int.
 
bool type_is_list () const noexcept
 Dynamic check whether the term is an aterm_list.
 
bool operator== (const unprotected_aterm_core &t) const
 Comparison operator.
 
bool operator!= (const unprotected_aterm_core &t) const
 Inequality operator on two unprotected aterms.
 
bool operator< (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator> (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator<= (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator>= (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool defined () const
 Returns true if this term is not equal to the term assigned by the default constructor of aterms, aterm_appls and aterm_int.
 
void swap (unprotected_aterm_core &t) noexcept
 Swaps this term with its argument.
 
const function_symbolfunction () const
 Yields the function symbol in an aterm.
 

Protected Attributes

const detail::_atermm_term
 

Friends

detail::_atermdetail::address (const unprotected_aterm_core &t)
 

Detailed Description

An unprotected term does not change the reference count of the shared term when it is copied or moved.

Definition at line 31 of file aterm_core.h.

Constructor & Destructor Documentation

◆ unprotected_aterm_core() [1/2]

atermpp::unprotected_aterm_core::unprotected_aterm_core ( )
inlinenoexcept

Default constuctor.

Definition at line 41 of file aterm_core.h.

◆ unprotected_aterm_core() [2/2]

atermpp::unprotected_aterm_core::unprotected_aterm_core ( const detail::_aterm term)
inlinenoexcept

Constructor.

Parameters
termThe term from which the new term is constructed.

Definition at line 47 of file aterm_core.h.

Member Function Documentation

◆ defined()

bool atermpp::unprotected_aterm_core::defined ( ) const
inline

Returns true if this term is not equal to the term assigned by the default constructor of aterms, aterm_appls 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(), aterm_list() or an aterm_int().

Returns
A boolean indicating whether this term equals the default constructor.

Definition at line 143 of file aterm_core.h.

◆ function()

const function_symbol & atermpp::unprotected_aterm_core::function ( ) const
inline

Yields 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.

Definition at line 161 of file aterm_core.h.

◆ operator!=()

bool atermpp::unprotected_aterm_core::operator!= ( const unprotected_aterm_core t) const
inline

Inequality operator on two unprotected aterms.

See note at the == operator. This operator requires constant time.

Parameters
tA term to which the current term is compared.
Returns
false iff t is equal to the current term.

Definition at line 92 of file aterm_core.h.

◆ operator<()

bool atermpp::unprotected_aterm_core::operator< ( const unprotected_aterm_core t) const
inline

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
tA term to which the current term is compared.
Returns
True iff the current term is smaller than the argument.

Definition at line 104 of file aterm_core.h.

◆ operator<=()

bool atermpp::unprotected_aterm_core::operator<= ( const unprotected_aterm_core t) const
inline

Comparison operator for two unprotected aterms.

This operator requires constant time. See note at the operator <.

Parameters
tA term to which the current term is compared.
Returns
True iff the current term is smaller or equal than the argument.

Definition at line 122 of file aterm_core.h.

◆ operator==()

bool atermpp::unprotected_aterm_core::operator== ( const unprotected_aterm_core t) const
inline

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.

Definition at line 83 of file aterm_core.h.

◆ operator>()

bool atermpp::unprotected_aterm_core::operator> ( const unprotected_aterm_core t) const
inline

Comparison operator for two unprotected aterms.

This operator requires constant time. See note at the operator <.

Parameters
tA term to which the current term is compared.
Returns
True iff the current term is larger than the argument.

Definition at line 113 of file aterm_core.h.

◆ operator>=()

bool atermpp::unprotected_aterm_core::operator>= ( const unprotected_aterm_core t) const
inline

Comparison operator for two unprotected aterms.

This operator requires constant time. See note at the operator <.

Parameters
tA term to which the current term is compared.
Returns
True iff the current term is larger or equalthan the argument.

Definition at line 131 of file aterm_core.h.

◆ swap()

void atermpp::unprotected_aterm_core::swap ( unprotected_aterm_core t)
inlinenoexcept

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
tThe term with which this term is swapped.

Definition at line 152 of file aterm_core.h.

◆ type_is_appl()

bool atermpp::unprotected_aterm_core::type_is_appl ( ) const
inlinenoexcept

Dynamic check whether the term is an aterm.

Returns
True iff this term is an term_appl.

This function has constant complexity. It is defined as !type_is_int() && !type_is_list().

Definition at line 55 of file aterm_core.h.

◆ type_is_int()

bool atermpp::unprotected_aterm_core::type_is_int ( ) const
inlinenoexcept

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.

Definition at line 63 of file aterm_core.h.

◆ type_is_list()

bool atermpp::unprotected_aterm_core::type_is_list ( ) const
inlinenoexcept

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.

Definition at line 72 of file aterm_core.h.

Friends And Related Symbol Documentation

◆ detail::address

Member Data Documentation

◆ m_term

const detail::_aterm* atermpp::unprotected_aterm_core::m_term
protected

Definition at line 36 of file aterm_core.h.


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