![]() |
mutable
A Database System for Research and Fast Prototyping
|
Explicit specialization of PODPool for strings (const char *). More...
#include <Pool.hpp>
Public Types | |
| using | counter_type = std::conditional_t< ThreadSafe, std::atomic< uint32_t >, uint32_t > |
| using | table_type = std::unordered_map< T, counter_type, Hash, KeyEqual > |
| using | pooled_type = T |
| using | proxy_type = Pooled< T, PODPool, false > |
| using | proxy_optional_type = Pooled< T, PODPool, true > |
| using | hasher = Hash |
| using | key_equal = KeyEqual |
| using | copy = Copy |
| using | const_iterator = table_type::const_iterator |
Public Member Functions | |
| _StringPool ()=default | |
| _StringPool (std::size_t initial_capacity) | |
| ~_StringPool () | |
| std::size_t | size () const |
| Returns the number of elements in the pool. | |
| const_iterator | begin () |
| const_iterator | end () |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| template<typename U > | |
| proxy_type | operator() (U &&u) |
| Returns the pooled. | |
Static Public Attributes | |
| static constexpr bool | is_thread_safe = ThreadSafe |
Private Types | |
| using | super = PODPool< const char *, StrHash, StrEqual, StrClone, ThreadSafe > |
Private Member Functions | |
| template<bool CanBeNone> | |
| bool | erase (const Pooled< T, PODPool, CanBeNone > &pooled) |
| Erases the pooled entity from the pool. | |
Static Private Member Functions | |
| template<bool CanBeNone> | |
| static const T & | Get (const Pooled< T, PODPool, CanBeNone > &pooled) |
| Returns a reference to the value referenced by. | |
Private Attributes | |
| table_type | table_ |
| OptField< ThreadSafe, reader_writer_mutex > | table_mutex_ |
Explicit specialization of PODPool for strings (const char *).
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
private |
|
inherited |
|
default |
|
inline |
|
inline |
|
inlineinherited |
Definition at line 59 of file Pool.hpp.
References m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::table_.
|
inlineinherited |
Definition at line 61 of file Pool.hpp.
References m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::table_.
|
inlineinherited |
Definition at line 62 of file Pool.hpp.
References m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::table_.
|
inlineinherited |
Definition at line 60 of file Pool.hpp.
References m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::table_.
|
privateinherited |
Erases the pooled entity from the pool.
Requires that the reference count is 0.
Definition at line 357 of file Pool.hpp.
References M_insist, and m::Pooled< T, Pool, CanBeNone >::ref_.
|
staticprivateinherited |
Returns a reference to the value referenced by.
| pooled. |
Definition at line 374 of file Pool.hpp.
References M_insist, m::Pooled< T, Pool, CanBeNone >::ref_, and m::T().
|
inherited |
Returns the pooled.
| u. |
Definition at line 333 of file Pool.hpp.
References m::reader_writer_lock::lock_read(), and M_insist.
|
inlineinherited |
Returns the number of elements in the pool.
Definition at line 57 of file Pool.hpp.
References m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::table_.
|
staticconstexprinherited |
|
privateinherited |
Definition at line 39 of file Pool.hpp.
Referenced by m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::begin(), m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::cbegin(), m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::cend(), m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::end(), m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::size(), and m::PODPool< T, Hash, KeyEqual, Copy, ThreadSafe >::~PODPool().
|
mutableprivateinherited |