ArenaAllocatorRegistry implementation class.
More...
|
typedef std::map< std::string, size_t > | map_t |
| Map from names to indices. More...
|
|
typedef std::lock_guard< std::mutex > | lock_t |
|
ArenaAllocatorRegistry implementation class.
Definition at line 30 of file ArenaAllocatorRegistry.cxx.
◆ lock_t
◆ map_t
◆ ~ArenaAllocatorRegistryImpl()
SG::ArenaAllocatorRegistryImpl::~ArenaAllocatorRegistryImpl |
( |
| ) |
|
◆ create()
Create a new instance of an allocator.
- Parameters
-
i | The index of the allocator to create. |
- Returns
- A newly-allocated allocator instance.
Definition at line 150 of file ArenaAllocatorRegistry.cxx.
◆ lookup()
size_t SG::ArenaAllocatorRegistryImpl::lookup |
( |
const std::string & |
name | ) |
|
Look up the index for an allocator type name.
- Parameters
-
name | The name of the allocator type to find. |
- Returns
- The index corresponding to the type, or
std::string::npos
if it hasn't yet been registered.
Definition at line 133 of file ArenaAllocatorRegistry.cxx.
138 return std::string::npos;
◆ registerCreator()
size_t SG::ArenaAllocatorRegistryImpl::registerCreator |
( |
const std::string & |
name, |
|
|
std::unique_ptr< ArenaAllocatorCreator > |
creator |
|
) |
| |
Register a new allocator type.
- Parameters
-
name | The name of the allocator type. |
creator | The factory object to create instances of this type. The registry takes ownership of this pointer. |
- Returns
- The new integer index for this allocator type.
If the allocator type already exists, then the index of the existing one is returned (and the object passed as creator
is deleted).
Definition at line 102 of file ArenaAllocatorRegistry.cxx.
◆ m_creators
◆ m_map
map_t SG::ArenaAllocatorRegistryImpl::m_map |
|
private |
◆ m_mutex
std::mutex SG::ArenaAllocatorRegistryImpl::m_mutex |
|
private |
The documentation for this class was generated from the following file: