The class LevelSetValueCacheEntry allows to get read-only access to a value stored in the cache. More...
#include <levelSetCache.hpp>
Public Member Functions | |
LevelSetValueCacheEntry () | |
LevelSetValueCacheEntry (const value_t &value) | |
const value_t & | operator* () const |
Public Member Functions inherited from bitpit::LevelSetValueCacheBaseEntry< value_t > | |
LevelSetValueCacheBaseEntry (bool valid) | |
bool | isValid () const |
Additional Inherited Members | |
Static Protected Attributes inherited from bitpit::LevelSetValueCacheBaseEntry< value_t > | |
static const value_t | m_dummyValue = value_t{} |
The class LevelSetValueCacheEntry allows to get read-only access to a value stored in the cache.
The value stored in the cache entry may not point directly to the valued contained in the cache. For example, for boolean values, the cache entry will point to an internally defined boolean variable. In this case, the value of the internal variable will be set equal to the value of the cache during the construction of the entry (this means that, if the cached values changes, the entry will not be updated). This is done to make it possible for the cache entry to deal with std::vector containing bool values.
Definition at line 115 of file levelSetCache.hpp.
bitpit::LevelSetValueCacheEntry< value_t >::LevelSetValueCacheEntry | ( | ) |
Constructor for invalid entries.
Definition at line 65 of file levelSetCache.tpp.
bitpit::LevelSetValueCacheEntry< value_t >::LevelSetValueCacheEntry | ( | const value_t & | value | ) |
Constructor for valid entries.
value | is the cached value |
Definition at line 77 of file levelSetCache.tpp.
const value_t & bitpit::LevelSetValueCacheEntry< value_t >::operator* | ( | ) | const |
Get the stored value.
Trying to deference an invalid entry results in undefined behaviour.
Definition at line 89 of file levelSetCache.tpp.