JUCE
|
Functions | |
OutputStream &JUCE_CALLTYPE | operator<< (OutputStream &, const Value &) |
Writes a Value to an OutputStream as a UTF8 string. More... | |
CachedValue< Type >::CachedValue () | |
Default constructor. More... | |
CachedValue< Type >::CachedValue (ValueTree &tree, const Identifier &propertyID, UndoManager *undoManager) | |
Constructor. More... | |
CachedValue< Type >::CachedValue (ValueTree &tree, const Identifier &propertyID, UndoManager *undoManager, const Type &defaultToUse) | |
Constructor. More... | |
Value | CachedValue< Type >::getPropertyAsValue () |
Returns the current property as a Value object. More... | |
bool | CachedValue< Type >::isUsingDefault () const |
Returns true if the current property does not exist and the CachedValue is using the fallback default value instead. More... | |
CachedValue & | CachedValue< Type >::operator= (const Type &newValue) |
Sets the property. More... | |
void | CachedValue< Type >::setValue (const Type &newValue, UndoManager *undoManagerToUse) |
Sets the property. More... | |
void | CachedValue< Type >::resetToDefault () |
Removes the property from the referenced ValueTree and makes the CachedValue return the fallback default value instead. More... | |
void | CachedValue< Type >::resetToDefault (UndoManager *undoManagerToUse) |
Removes the property from the referenced ValueTree and makes the CachedValue return the fallback default value instead. More... | |
void | CachedValue< Type >::referTo (ValueTree &tree, const Identifier &property, UndoManager *um) |
Makes the CachedValue refer to the specified property inside the given ValueTree. More... | |
void | CachedValue< Type >::referTo (ValueTree &tree, const Identifier &property, UndoManager *um, const Type &defaultVal) |
Makes the CachedValue refer to the specified property inside the given ValueTree, and specifies a fallback value to use if the property does not exist. More... | |
void | CachedValue< Type >::forceUpdateOfCachedValue () |
Force an update in case the referenced property has been changed from elsewhere. More... | |
OutputStream& JUCE_CALLTYPE operator<< | ( | OutputStream & | , |
const Value & | |||
) |
Writes a Value to an OutputStream as a UTF8 string.
|
default |
Default constructor.
Creates a default CachedValue not referring to any property. To initialise the object, call one of the referTo() methods.
CachedValue< Type >::CachedValue | ( | ValueTree & | tree, |
const Identifier & | propertyID, | ||
UndoManager * | undoManager | ||
) |
Constructor.
Creates a CachedValue referring to a Value property inside a ValueTree. If you use this constructor, the fallback value will be a default-constructed instance of Type.
tree | The ValueTree containing the property |
propertyID | The identifier of the property |
undoManager | The UndoManager to use when writing to the property |
References ValueTree::addListener().
CachedValue< Type >::CachedValue | ( | ValueTree & | tree, |
const Identifier & | propertyID, | ||
UndoManager * | undoManager, | ||
const Type & | defaultToUse | ||
) |
Constructor.
Creates a default Cached Value referring to a Value property inside a ValueTree, and specifies a fallback value to use if the property does not exist.
tree | The ValueTree containing the property |
propertyID | The identifier of the property |
undoManager | The UndoManager to use when writing to the property |
defaultToUse | The fallback default value to use. |
References ValueTree::addListener().
Value CachedValue< Type >::getPropertyAsValue |
Returns the current property as a Value object.
bool CachedValue< Type >::isUsingDefault |
Returns true if the current property does not exist and the CachedValue is using the fallback default value instead.
CachedValue< Type > & CachedValue< Type >::operator= | ( | const Type & | newValue | ) |
Sets the property.
This will actually modify the property in the referenced ValueTree.
void CachedValue< Type >::setValue | ( | const Type & | newValue, |
UndoManager * | undoManagerToUse | ||
) |
Sets the property.
This will actually modify the property in the referenced ValueTree.
void CachedValue< Type >::resetToDefault |
Removes the property from the referenced ValueTree and makes the CachedValue return the fallback default value instead.
void CachedValue< Type >::resetToDefault | ( | UndoManager * | undoManagerToUse | ) |
Removes the property from the referenced ValueTree and makes the CachedValue return the fallback default value instead.
void CachedValue< Type >::referTo | ( | ValueTree & | tree, |
const Identifier & | property, | ||
UndoManager * | um | ||
) |
Makes the CachedValue refer to the specified property inside the given ValueTree.
References gl::v.
void CachedValue< Type >::referTo | ( | ValueTree & | tree, |
const Identifier & | property, | ||
UndoManager * | um, | ||
const Type & | defaultVal | ||
) |
Makes the CachedValue refer to the specified property inside the given ValueTree, and specifies a fallback value to use if the property does not exist.
References gl::v.
void CachedValue< Type >::forceUpdateOfCachedValue |
Force an update in case the referenced property has been changed from elsewhere.
Note: The CachedValue is a ValueTree::Listener and therefore will be informed of changes of the referenced property anyway (and update itself). But this may happen asynchronously. forceUpdateOfCachedValue() forces an update immediately.