Inheritance Graph
graph BT
ObjectCache
click ObjectCache "classUtil_1_1ObjectCache"
Description
Generic object cache for objects allowing lambdas with variable number of arguments as cache functions.
The cache template can be instaniated to generate different kinds of caches. The generated cache generates and caches objects of typeObjectType. It hashes the parameters used to create an object and stores it in a map. If an object with the same hash already exists, it is returned instead of creating a new one.
Parameters
- ObjectType
- Base type for all objects that are generated by the factory
- IdentifierType
- Type of the identifier that specifies which object cache to call
- FallbackPolicy
- Template with a functiononUnknownType()that handles the case that the requested object type was not found
Classes
Public Types
Public Attributes
Public Functions
Documentation
typedef
Util::ObjectCache::fallbackPolicy_t
Defined in Util/Factory/ObjectCache.h:48
variable
Util::ObjectCache::fallbackPolicy
Defined in Util/Factory/ObjectCache.h:49
function
Util::ObjectCache::ObjectCache
Defined in Util/Factory/ObjectCache.h:50
function
Util::ObjectCache::ObjectCache
Defined in Util/Factory/ObjectCache.h:52
function
Util::ObjectCache::~ObjectCache
Defined in Util/Factory/ObjectCache.h:54
function
Util::ObjectCache::registerType
Defined in Util/Factory/ObjectCache.h:60
function
Util::ObjectCache::unregisterType
Defined in Util/Factory/ObjectCache.h:70
function
Util::ObjectCache::hasType
|
|
|
|
|
|
bool hasType( |
const IdentifierType & |
id ) |
Defined in Util/Factory/ObjectCache.h:77
function
Util::ObjectCache::create
|
|
|
template< typename… Args > |
|
|
ObjectType create( |
const IdentifierType & |
id, |
|
Args… |
args |
) |
|
|
Defined in Util/Factory/ObjectCache.h:82
function
Util::ObjectCache::release
|
|
|
|
|
|
void release( |
const IdentifierType & |
id, |
|
size_t |
hash |
) |
|
|
Defined in Util/Factory/ObjectCache.h:103
function
Util::ObjectCache::reset
Defined in Util/Factory/ObjectCache.h:110