The class LevelSetCacheCollection::Item defines the items stored in a cache collection. Each item stores the cache and the factory that will be used to create the cache. More...
Public Member Functions | |
Item (const Item &other) | |
Item (const std::shared_ptr< LevelSetCacheFactory< key_t > > &factory=nullptr) | |
Item (Item &&other)=default | |
LevelSetCache< key_t > * | createCache () |
void | destroyCache () |
LevelSetCache< key_t > * | getCache (bool allowCreation=true) |
template<typename value_t > | |
LevelSetValueCache< key_t, value_t > * | getCache (bool allowCreation=true) |
const LevelSetCache< key_t > * | getCache (bool allowCreation=true) const |
template<typename value_t > | |
const LevelSetValueCache< key_t, value_t > * | getCache (bool allowCreation=true) const |
bool | hasCache () const |
bool | hasFactory () const |
Item & | operator= (const Item &other) |
Item & | operator= (Item &&other)=default |
The class LevelSetCacheCollection::Item defines the items stored in a cache collection. Each item stores the cache and the factory that will be used to create the cache.
Definition at line 593 of file levelSetCache.hpp.
bitpit::LevelSetCacheCollection< key_t >::Item::Item | ( | const std::shared_ptr< LevelSetCacheFactory< key_t > > & | factory = nullptr | ) |
Constructor.
factory | is the factory that will be used to create the cache |
Definition at line 1462 of file levelSetCache.tpp.
LevelSetCache< key_t > * bitpit::LevelSetCacheCollection< key_t >::Item::createCache | ( | ) |
Create the cache associated with the item.
If the cache has been previously created, the existing cache will be returned. If no factory has been set for the item, a null pointer is returned.
Definition at line 1527 of file levelSetCache.tpp.
void bitpit::LevelSetCacheCollection< key_t >::Item::destroyCache | ( | ) |
Destroy the cache associated with the item.
Definition at line 1563 of file levelSetCache.tpp.
LevelSetCache< key_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) |
Get a pointer to the cache owned by the item.
allowCreation | controls the behaviour when the cache has not yet been created, if the argument is set to true, the item will create a new cache from scratch, otherwise a null pointer is returned |
Definition at line 1577 of file levelSetCache.tpp.
LevelSetValueCache< key_t, value_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) |
Get a pointer to the cache owned by the item.
allowCreation | controls the behaviour when the cache has not yet been created, if the argument is set to true, the item will create a new cache from scratch, otherwise a null pointer is returned |
Definition at line 1617 of file levelSetCache.tpp.
const LevelSetCache< key_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) | const |
Get a constant pointer to the cache owned by the item.
allowCreation | controls the behaviour when the cache has not yet been created, if the argument is set to true, the item will create a new cache from scratch, otherwise a null pointer is returned |
Definition at line 1591 of file levelSetCache.tpp.
const LevelSetValueCache< key_t, value_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) | const |
Get a constant pointer to the cache owned by the item.
allowCreation | controls the behaviour when the cache has not yet been created, if the argument is set to true, the item will create a new cache from scratch, otherwise a null pointer is returned |
Definition at line 1632 of file levelSetCache.tpp.
bool bitpit::LevelSetCacheCollection< key_t >::Item::hasCache | ( | ) | const |
Check if a cache has been created for the item.
Definition at line 1512 of file levelSetCache.tpp.
bool bitpit::LevelSetCacheCollection< key_t >::Item::hasFactory | ( | ) | const |
Check if a factory has been set for the item.
Definition at line 1501 of file levelSetCache.tpp.