mCRL2
Loading...
Searching...
No Matches
aterm_int.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink, Jan Friso Groote, based on the aterm library.
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9
10#ifndef MCRL2_ATERMPP_DETAIL_ATERM_INT_H
11#define MCRL2_ATERMPP_DETAIL_ATERM_INT_H
12
14
15namespace atermpp
16{
17namespace detail
18{
19
21class _aterm_int : public _aterm
22{
23public:
25 _aterm_int(std::size_t value) :
28 {}
29
30 std::size_t value() const noexcept
31 {
32 return m_value;
33 }
34
35private:
36 std::size_t m_value;
37};
38
39static_assert(sizeof(_aterm_int) == sizeof(_aterm) + sizeof(std::size_t), "Sanity check: _aterm_int size");
40
41} // namespace detail
42
43} // namespace atermpp
44
45#endif // MCRL2_ATERMPP_DETAIL_ATERM_INT_H
The underlying integer term that actually carries the integer data.
Definition aterm_int.h:22
std::size_t value() const noexcept
Definition aterm_int.h:30
_aterm_int(std::size_t value)
Constructs the underlying term from a given value.
Definition aterm_int.h:25
This is the class to which an aterm points.
Definition aterm_core.h:48
function_symbol g_as_int
These function symbols are used to indicate integer, list and empty list terms.
The main namespace for the aterm++ library.
Definition algorithm.h:21