TracktionEngine
Loading...
Searching...
No Matches
tracktion_ValueTreeUtilities.h File Reference

Classes

struct  juce::VariantConverter< Colour >
class  engine::ValueTreeObjectList< ObjectType, CriticalSectionType >
struct  engine::SortedValueTreeObjectList< ObjectType >
struct  engine::ValueTreeAllEventListener
class  engine::LambdaValueTreeAllEventListener
class  engine::ValueTreePropertyChangedListener
struct  engine::ValueTreeComparator< Type >
class  engine::ReferenceCountedValueTree
 Holds a ValueTree as a ReferenceCountedObject. More...

Namespaces

namespace  juce
namespace  engine

Functions

template<typename VarType>
void engine::convertPropertyToType (juce::ValueTree &v, const juce::Identifier &id)
 Ensures a property is a given type which can avoid having to parse a string every time it is read after loading from XML.
template<typename Type>
bool engine::matchesAnyOf (const Type &needle, const std::initializer_list< Type > &haystack)
 Returns true if the needle is found in the haystack.
template<typename Type, typename UnaryFunction>
void engine::forEachItem (const juce::Array< Type * > &items, const UnaryFunction &fn)
 Calls a function object on each item in an array.
template<typename... Others>
void engine::addValueTreeProperties (juce::ValueTree &v, const juce::Identifier &name, const juce::var &value, Others &&... others)
template<typename... Properties>
juce::ValueTree engine::createValueTree (const juce::Identifier &name, Properties &&... properties)
juce::Array< juce::ValueTree > & engine::removeInvalidValueTrees (juce::Array< juce::ValueTree > &trees)
 Strips out any invalid trees from the array.
juce::Array< juce::ValueTree > engine::getTreesOfType (const juce::Array< juce::ValueTree > &trees, const juce::Identifier &type)
 Returns a new array with any trees without the given type removed.
void engine::getChildTreesRecursive (juce::Array< juce::ValueTree > &result, const juce::ValueTree &tree)
void engine::renamePropertyRecursive (juce::ValueTree &tree, const juce::Identifier &oldName, const juce::Identifier &newName, juce::UndoManager *um)
juce::ValueTree engine::getOrCreateChildWithTypeAndProperty (juce::ValueTree &tree, const juce::Identifier &type, const juce::Identifier &property, const juce::var &propertyValue, juce::UndoManager *undoManager)
 Looks for a chile with the given name and property, if one doesn't exist, creates it.