ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthAllocators
AthAllocators
ArenaAllocatorRegistry.h
Go to the documentation of this file.
1
// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// $Id: ArenaAllocatorRegistry.h 470529 2011-11-24 23:54:22Z ssnyder $
8
16
17
#ifndef ATLALLOCATORS_ARENAALLOCATORREGISTRY_H
18
#define ATLALLOCATORS_ARENAALLOCATORREGISTRY_H
19
20
21
#include "
AthAllocators/ArenaAllocatorCreator.h
"
22
#include <cstdlib>
23
#include <string>
24
#include <memory>
25
26
27
namespace
SG
{
28
29
30
class
ArenaAllocatorBase
;
31
class
ArenaAllocatorRegistryImpl
;
32
33
43
class
ArenaAllocatorRegistry
44
{
45
public
:
56
size_t
registerCreator
(
const
std::string& name,
57
std::unique_ptr<ArenaAllocatorCreator> creator);
58
59
66
size_t
lookup
(
const
std::string& name);
67
68
74
std::unique_ptr<ArenaAllocatorBase>
create
(
size_t
i);
75
76
80
static
ArenaAllocatorRegistry
*
instance
();
81
82
83
private
:
85
std::unique_ptr<ArenaAllocatorRegistryImpl>
m_impl
;
86
87
// Disallow copying.
88
ArenaAllocatorRegistry
(
const
ArenaAllocatorRegistry
&);
89
ArenaAllocatorRegistry
&
operator=
(
const
ArenaAllocatorRegistry
&);
90
92
ArenaAllocatorRegistry
();
93
95
~ArenaAllocatorRegistry
();
96
97
// Just to avoid compiler warnings.
98
friend
class
ArenaAllocatorRegistryImpl
;
99
};
100
101
102
}
// namespace SG
103
104
105
#endif
// not ATLALLOCATORS_ARENAALLOCATORREGISTRY_H
ArenaAllocatorCreator.h
Provide an interface for creating an arena Allocator. See Arena.h for an overview of the arena-based ...
SG::ArenaAllocatorBase
Common base class for arena allocator classes.
Definition
ArenaAllocatorBase.h:134
SG::ArenaAllocatorRegistryImpl
ArenaAllocatorRegistry implementation class.
Definition
ArenaAllocatorRegistry.cxx:31
SG::ArenaAllocatorRegistry::create
std::unique_ptr< ArenaAllocatorBase > create(size_t i)
Create a new instance of an allocator.
Definition
ArenaAllocatorRegistry.cxx:195
SG::ArenaAllocatorRegistry::registerCreator
size_t registerCreator(const std::string &name, std::unique_ptr< ArenaAllocatorCreator > creator)
Register a new allocator type.
Definition
ArenaAllocatorRegistry.cxx:171
SG::ArenaAllocatorRegistry::ArenaAllocatorRegistry
ArenaAllocatorRegistry()
Constructor. Called only by instance.
Definition
ArenaAllocatorRegistry.cxx:214
SG::ArenaAllocatorRegistry::operator=
ArenaAllocatorRegistry & operator=(const ArenaAllocatorRegistry &)
SG::ArenaAllocatorRegistry::ArenaAllocatorRegistry
ArenaAllocatorRegistry(const ArenaAllocatorRegistry &)
SG::ArenaAllocatorRegistry::lookup
size_t lookup(const std::string &name)
Look up the index for an allocator type name.
Definition
ArenaAllocatorRegistry.cxx:184
SG::ArenaAllocatorRegistry::~ArenaAllocatorRegistry
~ArenaAllocatorRegistry()
Destructor. Called only by instance.
Definition
ArenaAllocatorRegistry.cxx:223
SG::ArenaAllocatorRegistry::ArenaAllocatorRegistryImpl
friend class ArenaAllocatorRegistryImpl
Definition
ArenaAllocatorRegistry.h:98
SG::ArenaAllocatorRegistry::m_impl
std::unique_ptr< ArenaAllocatorRegistryImpl > m_impl
The implementation object.
Definition
ArenaAllocatorRegistry.h:85
SG::ArenaAllocatorRegistry::instance
static ArenaAllocatorRegistry * instance()
Return a pointer to the global ArenaAllocatorRegistry instance.
Definition
ArenaAllocatorRegistry.cxx:204
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
Generated on
for ATLAS Offline Software by
1.17.0