# atermpp::aterm¶

Include file:

#include "mcrl2/atermpp/aterm.h

class atermpp::aterm

The aterm base class that provides protection of the underlying shared terms.

## Public member functions¶

aterm() noexcept = default

Default constructor.

aterm(detail::_aterm *t) noexcept

Constructor based on an internal term data structure. This is not for public use.

Takes ownership of the passed underlying term.

Parameters:

• t A pointer to an internal aterm data structure.

TodoShould be protected, but this cannot yet be done due to a problem in the compiling rewriter.

aterm(const aterm &other) noexcept

Copy constructor.

Parameters:

• other The aterm that is copied.

This class has a non-trivial destructor so explicitly define the copy and move operators.

aterm(aterm &&other) noexcept

Move constructor.

Parameters:

• other The aterm 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.

aterm &operator=(const aterm &other) noexcept

Assignment operator.

Parameters:

• other The aterm that will be assigned.

Returns: A reference to the assigned term.

aterm &operator=(aterm &&other) noexcept

Move assignment operator.

This move assignment operator

Parameters:

• other The aterm that will be assigned.

Returns: A reference to the assigned term.

~aterm()

Standard destructor.

## Protected member functions¶

void decrement_reference_count() const

Decrement the reference count.

This decrements the reference count unless the term contains null. Use with care as this destroys the reference count mechanism.

void increment_reference_count() const

Increment the reference count.

This increments the reference count unless the term contains null. Use with care as this destroys the reference count mechanism.