cello
JUCE ValueTrees for Humans
Loading...
Searching...
No Matches
cello::Value< T >::Cached Class Reference

A utility class to maintain the last known value of a cello::Value object – each call that fetches from a Value does two things that may be more costly than we like in some cases: More...

#include <cello_value.h>

Public Member Functions

 Cached (Value< T > &val)
 
 operator T () const
 

Detailed Description

template<typename T>
class cello::Value< T >::Cached

A utility class to maintain the last known value of a cello::Value object – each call that fetches from a Value does two things that may be more costly than we like in some cases:

  • fetch the current value from the underlying value tree
  • execute the onGet validation function if one is defined for this value.

Objects of this type will store the last value of the associated Value object each time it's changed, and can be used directly without additional overhead.

NOTE that we store a reference to a Value object owned by another cello::Object; be careful that the lifetime of this cached value object is not longer than that owning object.


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