mCRL2
Loading...
Searching...
No Matches
global_aterm_pool.h
Go to the documentation of this file.
1// Author(s): Maurice Laveaux.
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_GLOBAL_ATERM_POOL_H_
11#define MCRL2_ATERMPP_DETAIL_GLOBAL_ATERM_POOL_H_
12
15
16namespace atermpp
17{
18namespace detail
19{
20
22extern typename std::aligned_storage<sizeof(aterm_pool), alignof(aterm_pool)>::type g_aterm_pool_storage;
23
25static aterm_pool& g_aterm_pool_instance = *static_cast<aterm_pool*>(static_cast<void*>(&g_aterm_pool_storage));
26
30template<bool lazy = false>
32{
33 if (lazy)
34 {
35 static bool initialized = false;
36 if (!initialized)
37 {
39 initialized = true;
40 }
41 }
42
44}
45
46// Implemented in a .cpp file.
47//thread_aterm_pool& g_thread_term_pool();
48
49} // namespace detail
50} // namespace atermpp
51
53
54#endif // MCRL2_ATERMPP_DETAIL_GLOBAL_ATERM_POOL_H_
The interface for the term library. Provides the storage of of all classes of terms.
Definition aterm_pool.h:82
aterm_pool & g_term_pool()
obtain a reference to the global aterm pool.
std::aligned_storage< sizeof(aterm_pool), alignof(aterm_pool)>::type g_aterm_pool_storage
Storage for a global term pool that is not initialized.
static aterm_pool & g_aterm_pool_instance
A reference to the global term pool storage.
The main namespace for the aterm++ library.
Definition algorithm.h:21