![]() |
cello
JUCE ValueTrees for Humans
|
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 | |
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:
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.