OpenShot Library | libopenshot-audio 0.2.0
juce::ValueTree::SharedObject Class Reference
+ Inheritance diagram for juce::ValueTree::SharedObject:

Classes

struct  AddOrRemoveChildAction
 
struct  MoveChildAction
 
struct  SetPropertyAction
 

Public Types

using Ptr = ReferenceCountedObjectPtr< SharedObject >
 

Public Member Functions

 SharedObject (const Identifier &t) noexcept
 
 SharedObject (const SharedObject &other)
 
SharedObjectoperator= (const SharedObject &)=delete
 
SharedObjectgetRoot () noexcept
 
template<typename Function >
void callListeners (ValueTree::Listener *listenerToExclude, Function fn) const
 
template<typename Function >
void callListenersForAllParents (ValueTree::Listener *listenerToExclude, Function fn) const
 
void sendPropertyChangeMessage (const Identifier &property, ValueTree::Listener *listenerToExclude=nullptr)
 
void sendChildAddedMessage (ValueTree child)
 
void sendChildRemovedMessage (ValueTree child, int index)
 
void sendChildOrderChangedMessage (int oldIndex, int newIndex)
 
void sendParentChangeMessage ()
 
void setProperty (const Identifier &name, const var &newValue, UndoManager *undoManager, ValueTree::Listener *listenerToExclude=nullptr)
 
bool hasProperty (const Identifier &name) const noexcept
 
void removeProperty (const Identifier &name, UndoManager *undoManager)
 
void removeAllProperties (UndoManager *undoManager)
 
void copyPropertiesFrom (const SharedObject &source, UndoManager *undoManager)
 
ValueTree getChildWithName (const Identifier &typeToMatch) const
 
ValueTree getOrCreateChildWithName (const Identifier &typeToMatch, UndoManager *undoManager)
 
ValueTree getChildWithProperty (const Identifier &propertyName, const var &propertyValue) const
 
bool isAChildOf (const SharedObject *possibleParent) const noexcept
 
int indexOf (const ValueTree &child) const noexcept
 
void addChild (SharedObject *child, int index, UndoManager *undoManager)
 
void removeChild (int childIndex, UndoManager *undoManager)
 
void removeAllChildren (UndoManager *undoManager)
 
void moveChild (int currentIndex, int newIndex, UndoManager *undoManager)
 
void reorderChildren (const OwnedArray< ValueTree > &newOrder, UndoManager *undoManager)
 
bool isEquivalentTo (const SharedObject &other) const noexcept
 
XmlElementcreateXml () const
 
void writeToStream (OutputStream &output) const
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 Increments the object's reference count.
 
void decReferenceCount () noexcept
 Decreases the object's reference count.
 
bool decReferenceCountWithoutDeleting () noexcept
 Decreases the object's reference count.
 
int getReferenceCount () const noexcept
 Returns the object's current reference count.
 

Static Public Member Functions

static void writeObjectToStream (OutputStream &output, const SharedObject *object)
 

Public Attributes

const Identifier type
 
NamedValueSet properties
 
ReferenceCountedArray< SharedObjectchildren
 
SortedSet< ValueTree * > valueTreesWithListeners
 
SharedObjectparent = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject ()=default
 Creates the reference-counted object (with an initial ref count of zero).
 
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 Copying from another object does not affect this one's reference-count.
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 Copying from another object does not affect this one's reference-count.
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 Copying from another object does not affect this one's reference-count.
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 Copying from another object does not affect this one's reference-count.
 
virtual ~ReferenceCountedObject ()
 Destructor.
 
void resetReferenceCount () noexcept
 Resets the reference count to zero without deleting the object.
 

Detailed Description

Definition at line 30 of file juce_ValueTree.cpp.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ SharedObject() [1/2]

juce::ValueTree::SharedObject::SharedObject ( const Identifier t)
inlineexplicitnoexcept

Definition at line 35 of file juce_ValueTree.cpp.

◆ SharedObject() [2/2]

juce::ValueTree::SharedObject::SharedObject ( const SharedObject other)
inline

Definition at line 37 of file juce_ValueTree.cpp.

◆ ~SharedObject()

juce::ValueTree::SharedObject::~SharedObject ( )
inline

Definition at line 50 of file juce_ValueTree.cpp.

Member Function Documentation

◆ getRoot()

SharedObject & juce::ValueTree::SharedObject::getRoot ( )
inlinenoexcept

Definition at line 63 of file juce_ValueTree.cpp.

◆ callListeners()

template<typename Function >
void juce::ValueTree::SharedObject::callListeners ( ValueTree::Listener listenerToExclude,
Function  fn 
) const
inline

Definition at line 69 of file juce_ValueTree.cpp.

◆ callListenersForAllParents()

template<typename Function >
void juce::ValueTree::SharedObject::callListenersForAllParents ( ValueTree::Listener listenerToExclude,
Function  fn 
) const
inline

Definition at line 92 of file juce_ValueTree.cpp.

◆ sendPropertyChangeMessage()

void juce::ValueTree::SharedObject::sendPropertyChangeMessage ( const Identifier property,
ValueTree::Listener listenerToExclude = nullptr 
)
inline

Definition at line 98 of file juce_ValueTree.cpp.

◆ sendChildAddedMessage()

void juce::ValueTree::SharedObject::sendChildAddedMessage ( ValueTree  child)
inline

Definition at line 104 of file juce_ValueTree.cpp.

◆ sendChildRemovedMessage()

void juce::ValueTree::SharedObject::sendChildRemovedMessage ( ValueTree  child,
int  index 
)
inline

Definition at line 110 of file juce_ValueTree.cpp.

◆ sendChildOrderChangedMessage()

void juce::ValueTree::SharedObject::sendChildOrderChangedMessage ( int  oldIndex,
int  newIndex 
)
inline

Definition at line 116 of file juce_ValueTree.cpp.

◆ sendParentChangeMessage()

void juce::ValueTree::SharedObject::sendParentChangeMessage ( )
inline

Definition at line 122 of file juce_ValueTree.cpp.

◆ setProperty()

void juce::ValueTree::SharedObject::setProperty ( const Identifier name,
const var newValue,
UndoManager undoManager,
ValueTree::Listener listenerToExclude = nullptr 
)
inline

Definition at line 133 of file juce_ValueTree.cpp.

◆ hasProperty()

bool juce::ValueTree::SharedObject::hasProperty ( const Identifier name) const
inlinenoexcept

Definition at line 157 of file juce_ValueTree.cpp.

◆ removeProperty()

void juce::ValueTree::SharedObject::removeProperty ( const Identifier name,
UndoManager undoManager 
)
inline

Definition at line 162 of file juce_ValueTree.cpp.

◆ removeAllProperties()

void juce::ValueTree::SharedObject::removeAllProperties ( UndoManager undoManager)
inline

Definition at line 176 of file juce_ValueTree.cpp.

◆ copyPropertiesFrom()

void juce::ValueTree::SharedObject::copyPropertiesFrom ( const SharedObject source,
UndoManager undoManager 
)
inline

Definition at line 195 of file juce_ValueTree.cpp.

◆ getChildWithName()

ValueTree juce::ValueTree::SharedObject::getChildWithName ( const Identifier typeToMatch) const
inline

Definition at line 205 of file juce_ValueTree.cpp.

◆ getOrCreateChildWithName()

ValueTree juce::ValueTree::SharedObject::getOrCreateChildWithName ( const Identifier typeToMatch,
UndoManager undoManager 
)
inline

Definition at line 214 of file juce_ValueTree.cpp.

◆ getChildWithProperty()

ValueTree juce::ValueTree::SharedObject::getChildWithProperty ( const Identifier propertyName,
const var propertyValue 
) const
inline

Definition at line 225 of file juce_ValueTree.cpp.

◆ isAChildOf()

bool juce::ValueTree::SharedObject::isAChildOf ( const SharedObject possibleParent) const
inlinenoexcept

Definition at line 234 of file juce_ValueTree.cpp.

◆ indexOf()

int juce::ValueTree::SharedObject::indexOf ( const ValueTree child) const
inlinenoexcept

Definition at line 243 of file juce_ValueTree.cpp.

◆ addChild()

void juce::ValueTree::SharedObject::addChild ( SharedObject child,
int  index,
UndoManager undoManager 
)
inline

Definition at line 248 of file juce_ValueTree.cpp.

◆ removeChild()

void juce::ValueTree::SharedObject::removeChild ( int  childIndex,
UndoManager undoManager 
)
inline

Definition at line 289 of file juce_ValueTree.cpp.

◆ removeAllChildren()

void juce::ValueTree::SharedObject::removeAllChildren ( UndoManager undoManager)
inline

Definition at line 307 of file juce_ValueTree.cpp.

◆ moveChild()

void juce::ValueTree::SharedObject::moveChild ( int  currentIndex,
int  newIndex,
UndoManager undoManager 
)
inline

Definition at line 313 of file juce_ValueTree.cpp.

◆ reorderChildren()

void juce::ValueTree::SharedObject::reorderChildren ( const OwnedArray< ValueTree > &  newOrder,
UndoManager undoManager 
)
inline

Definition at line 336 of file juce_ValueTree.cpp.

◆ isEquivalentTo()

bool juce::ValueTree::SharedObject::isEquivalentTo ( const SharedObject other) const
inlinenoexcept

Definition at line 353 of file juce_ValueTree.cpp.

◆ createXml()

XmlElement * juce::ValueTree::SharedObject::createXml ( ) const
inline

Definition at line 368 of file juce_ValueTree.cpp.

◆ writeToStream()

void juce::ValueTree::SharedObject::writeToStream ( OutputStream output) const
inline

Definition at line 380 of file juce_ValueTree.cpp.

◆ writeObjectToStream()

static void juce::ValueTree::SharedObject::writeObjectToStream ( OutputStream output,
const SharedObject object 
)
inlinestatic

Definition at line 397 of file juce_ValueTree.cpp.

Member Data Documentation

◆ type

const Identifier juce::ValueTree::SharedObject::type

Definition at line 569 of file juce_ValueTree.cpp.

◆ properties

NamedValueSet juce::ValueTree::SharedObject::properties

Definition at line 570 of file juce_ValueTree.cpp.

◆ children

ReferenceCountedArray<SharedObject> juce::ValueTree::SharedObject::children

Definition at line 571 of file juce_ValueTree.cpp.

◆ valueTreesWithListeners

SortedSet<ValueTree*> juce::ValueTree::SharedObject::valueTreesWithListeners

Definition at line 572 of file juce_ValueTree.cpp.

◆ parent

SharedObject* juce::ValueTree::SharedObject::parent = nullptr

Definition at line 573 of file juce_ValueTree.cpp.


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