|
wxMaxima
|
A cached integer value. More...
#include <CachedValue.h>
Public Member Functions | |
| constexpr | CachedInteger (const CachedInteger &)=default |
| constexpr CachedInteger & | operator= (const CachedInteger &)=default |
| constexpr bool | IsValid () const |
| constexpr bool | IsInvalid () const |
| constexpr void | Invalidate () const |
| operator T () const | |
| T | Get () const |
| void | SetCached (T newValue) const |
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.