wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
LazyValue< T > Class Template Reference

A value that is computed the first time it is asked for. More...

#include <ClipboardContents.h>

Public Member Functions

 LazyValue (std::function< T()> renderer)
 
bool IsOffered () const
 Is there a value, or a way to compute one?
 
bool IsRendered () const
 Has the value been computed yet?
 
const T & Get () const
 The value, computed now if this is the first request.
 

Detailed Description

template<class T>
class LazyValue< T >

A value that is computed the first time it is asked for.

An empty renderer means "not offered"; see IsOffered(). The renderer is dropped once it has run, so whatever it captured (typically the shared ClipboardSnapshot) is freed as soon as nothing needs it any more.


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