wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
CachedInteger< T, type > Class Template Reference

A cached integer value. More...

#include <CachedValue.h>

Public Member Functions

constexpr CachedInteger (const CachedInteger &)=default
 
constexpr CachedIntegeroperator= (const CachedInteger &)=default
 
constexpr bool IsValid () const
 
constexpr bool IsInvalid () const
 
constexpr void Invalidate () const
 
 operator T () const
 
Get () const
 
void SetCached (T newValue) const
 

Detailed Description

template<typename T, typename std::enable_if< std::is_integral< T >::value, bool >::type = true>
class CachedInteger< T, type >

A cached integer value.

The value can be used in contexts where the integer could be used, but is "mostly" read-only: it can not be assigned to, but can be SetCached(). This is to enforce a protocol where a dedicated method updates the cached value, but elsewhere the value is only read from. Attempting to access an invalid value is checked for.


The documentation for this class was generated from the following file: