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 |
Detailed Description
interface bitpit::LevelSetCacheCollection< key_t >::Item
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.
Constructor & Destructor Documentation
◆ Item()
bitpit::LevelSetCacheCollection< key_t >::Item::Item | ( | const std::shared_ptr< LevelSetCacheFactory< key_t > > & | factory = nullptr | ) |
Constructor.
- Parameters
-
factory is the factory that will be used to create the cache
Definition at line 1462 of file levelSetCache.tpp.
Member Function Documentation
◆ createCache()
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.
- Returns
- Return a pointer to the newly created cache.
Definition at line 1527 of file levelSetCache.tpp.
◆ destroyCache()
void bitpit::LevelSetCacheCollection< key_t >::Item::destroyCache | ( | ) |
Destroy the cache associated with the item.
Definition at line 1563 of file levelSetCache.tpp.
◆ getCache() [1/4]
LevelSetCache< key_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) |
Get a pointer to the cache owned by the item.
- Parameters
-
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
- Returns
- A pointer to the cache owned by the item.
Definition at line 1577 of file levelSetCache.tpp.
◆ getCache() [2/4]
LevelSetValueCache< key_t, value_t > * bitpit::LevelSetCacheCollection< key_t >::Item::getCache | ( | bool | allowCreation = true | ) |
Get a pointer to the cache owned by the item.
- Parameters
-
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
- Returns
- A pointer to the cache owned by the item.
Definition at line 1617 of file levelSetCache.tpp.
◆ getCache() [3/4]
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.
- Parameters
-
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
- Returns
- A constant pointer to the cache owned by the item.
Definition at line 1591 of file levelSetCache.tpp.
◆ getCache() [4/4]
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.
- Parameters
-
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
- Returns
- A constant pointer to the cache owned by the item.
Definition at line 1632 of file levelSetCache.tpp.
◆ hasCache()
bool bitpit::LevelSetCacheCollection< key_t >::Item::hasCache | ( | ) | const |
Check if a cache has been created for the item.
- Returns
- Return true if a has has been created for the item, false otherwise.
Definition at line 1512 of file levelSetCache.tpp.
◆ hasFactory()
bool bitpit::LevelSetCacheCollection< key_t >::Item::hasFactory | ( | ) | const |
Check if a factory has been set for the item.
- Returns
- Return true if a factory has been set for the item, false otherwise.
Definition at line 1501 of file levelSetCache.tpp.
The documentation for this interface was generated from the following files:
- src/levelset/levelSetCache.hpp
- src/levelset/levelSetCache.tpp
