mCRL2
|
The aterm_core base class that provides protection of the underlying shared terms. More...
#include <aterm_core.h>
Public Member Functions | |
aterm_core () noexcept | |
Default constructor. | |
~aterm_core () noexcept | |
Standard destructor. | |
aterm_core (const detail::_aterm *t) noexcept | |
Constructor based on an internal term data structure. This is not for public use. | |
aterm_core (const aterm_core &other) noexcept | |
Copy constructor. | |
aterm_core (aterm_core &&other) noexcept | |
Move constructor. | |
aterm_core & | operator= (const aterm_core &other) noexcept |
Assignment operator. | |
aterm_core & | assign (const aterm_core &other, detail::thread_aterm_pool &pool) noexcept |
Assignment operator, to be used if busy and forbidden flags are explicitly available. | |
template<bool CHECK_BUSY_FLAG = true> | |
aterm_core & | unprotected_assign (const aterm_core &other) noexcept |
Assignment operator, to be used when the busy flags do not need to be set. | |
aterm_core & | operator= (aterm_core &&other) noexcept |
Move assignment operator. | |
Public Member Functions inherited from atermpp::unprotected_aterm_core | |
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_symbol & | function () const |
Yields the function symbol in an aterm. | |
Additional Inherited Members | |
Protected Attributes inherited from atermpp::unprotected_aterm_core | |
const detail::_aterm * | m_term |
The aterm_core base class that provides protection of the underlying shared terms.
Terms are protected using one of the following two invariants: (1) A term that can be accessed is a subterm of a term with a reference count larger than 0 (when reference counting is used). Or, (2) A term that can be accessed if it is a subterm of a term that occurs at an address which exist in the protection set of a process, or which sits in an atermpp container, which automatically is a container protection set. Furthermore, every address in a protection set contains a valid term. During garbage collection or rehashing, this situation is stable in the sense that all terms that are protected remain protected until the end of the garbage collection or rehashing phase by the same address or term. This means that during garbage collection no terms can be deleted, for instance in an assignment, or in a destruct.
Definition at line 181 of file aterm_core.h.
|
inlinenoexcept |
Default constructor.
Definition at line 62 of file aterm_implementation.h.
|
inlinenoexcept |
Standard destructor.
Definition at line 67 of file aterm_implementation.h.
|
inlineexplicitnoexcept |
Constructor based on an internal term data structure. This is not for public use.
Takes ownership of the passed underlying term.
t | A pointer to an internal aterm_core data structure. |
Definition at line 72 of file aterm_implementation.h.
|
inlinenoexcept |
Copy constructor.
other | The aterm_core that is copied. |
This class has a non-trivial destructor so explicitly define the copy and move operators.
Definition at line 78 of file aterm_implementation.h.
|
inlinenoexcept |
Move constructor.
other | The aterm_core that is moved into the new term. This term may have changed after this operation. |
This operation does not employ increments and decrements of reference counts and is therefore more efficient than the standard copy construct.
Definition at line 84 of file aterm_implementation.h.
|
inlinenoexcept |
Assignment operator, to be used if busy and forbidden flags are explicitly available.
other | The aterm_core that will be assigned. |
Definition at line 97 of file aterm_implementation.h.
|
inlinenoexcept |
Move assignment operator.
other | The aterm_core that will be assigned. |
Definition at line 115 of file aterm_implementation.h.
|
inlinenoexcept |
Assignment operator.
other | The aterm_core that will be assigned. |
Definition at line 90 of file aterm_implementation.h.
|
inlinenoexcept |
Assignment operator, to be used when the busy flags do not need to be set.
This is only safe in the parallel context when the busy flag is already known to be set. This is also checked by an assert. This can be used for instance in a lambda function that is passed in a make_.... function, as this unprotected assign will only be called when a term is constructed.
other | The aterm_core that will be assigned. |
Definition at line 107 of file aterm_implementation.h.