|
carl
25.04
Computer ARithmetic Library
|
#include <Pool.h>


Public Member Functions | |
| void | print () const |
| std::pair< typename FastPointerSet< Element >::iterator, bool > | insert (ElementPtr _element, bool _assertFreshness=false) |
| Inserts the given element into the pool, if it does not yet occur in there. More... | |
| ConstElementPtr | add (ElementPtr _element) |
| Adds the given element to the pool, if it does not yet occur in there. More... | |
Protected Member Functions | |
| Pool (unsigned _capacity=10000) | |
| Constructor of the pool. More... | |
| ~Pool () | |
| virtual void | assignId (ElementPtr, std::size_t) |
| Assigns a unique id to the generated element. More... | |
Private Types | |
| using | ElementPtr = Element * |
| using | ConstElementPtr = const Element * |
Private Attributes | |
| unsigned | mIdAllocator = 1 |
| id allocator More... | |
| FastPointerSet< Element > | mPool |
| The formula pool. More... | |
| std::mutex | mMutexPool |
| Mutex to avoid multiple access to the pool. More... | |
|
private |
|
private |
|
inlineexplicitprotected |
|
inlineprotected |
|
inline |
Adds the given element to the pool, if it does not yet occur in there.
Note, that this method uses the allocator which is locked before calling.
| _element | The element to add to the pool. |
Definition at line 113 of file Pool.h.

|
inlineprotectedvirtual |
Assigns a unique id to the generated element.
Note that this method serves as a callback for subclasses. The actual assignment of the id is done there.
| _element | The element for which to add the id. |
| _id | A unique id. |
Reimplemented in carl::BVTermPool, and carl::BVConstraintPool.
Definition at line 67 of file Pool.h.

|
inline |
Inserts the given element into the pool, if it does not yet occur in there.
| _element | The element to add to the pool. |
| _assertFreshness | When true, an assertion fails if the element is not fresh (i.e., if it already occurs in the pool). |
Definition at line 89 of file Pool.h.


|
inline |
|
private |
|
mutableprivate |
|
private |