Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::LevelSetValueCacheEntry< value_t > Class Template Reference

The class LevelSetValueCacheEntry allows to get read-only access to a value stored in the cache. More...

#include <levelSetCache.hpp>

Inheritance diagram for bitpit::LevelSetValueCacheEntry< value_t >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::LevelSetValueCacheEntry< value_t >:
Collaboration graph
[legend]

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{}
 

Detailed Description

template<typename value_t>
class bitpit::LevelSetValueCacheEntry< 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.

Constructor & Destructor Documentation

◆ LevelSetValueCacheEntry() [1/2]

template<typename value_t >
bitpit::LevelSetValueCacheEntry< value_t >::LevelSetValueCacheEntry ( )

Constructor for invalid entries.

Definition at line 65 of file levelSetCache.tpp.

◆ LevelSetValueCacheEntry() [2/2]

template<typename value_t >
bitpit::LevelSetValueCacheEntry< value_t >::LevelSetValueCacheEntry ( const value_t & value)

Constructor for valid entries.

Parameters
valueis the cached value

Definition at line 77 of file levelSetCache.tpp.

Member Function Documentation

◆ operator*()

template<typename value_t >
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.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---