JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ARADocument Class Reference

Base class representing an ARA document. More...

#include <juce_ARAModelObjects.h>

Inheritance diagram for juce::ARADocument:
Collaboration diagram for juce::ARADocument:

Public Types

using Listener = ARADocumentListener
 
using PropertiesPtr = ARA::PlugIn::PropertiesPtr< ARA::ARADocumentProperties >
 

Public Member Functions

void addListener (ARADocumentListener *l)
 Subscribe l to notified by changes to the object.
 
template<typename AudioSource_t = ARAAudioSource>
const std::vector< AudioSource_t * > & getAudioSources () const noexcept
 Returns the result of ARA::PlugIn::Document::getAudioSources() with the pointers within cast to ARAAudioSource*.
 
ARAObjectgetChild (size_t index) override
 Returns the child object associated with the given index.
 
template<typename MusicalContext_t = ARAMusicalContext>
const std::vector< MusicalContext_t * > & getMusicalContexts () const noexcept
 Returns the result of ARA::PlugIn::Document::getMusicalContexts() with the pointers within cast to ARAMusicalContext*.
 
size_t getNumChildren () const noexcept override
 Returns the number of ARA model objects aggregated by this object.
 
ARAObjectgetParent () override
 Returns the ARA model object that aggregates this object.
 
template<typename RegionSequence_t = ARARegionSequence>
const std::vector< RegionSequence_t * > & getRegionSequences () const noexcept
 Returns the result of ARA::PlugIn::Document::getRegionSequences() with the pointers within cast to ARARegionSequence*.
 
void notifyListeners (Callback &&callback)
 Call the provided callback for each of the added listeners.
 
void removeListener (ARADocumentListener *l)
 Unsubscribe l from object notifications.
 
template<typename Fn >
void traverse (Fn &&fn)
 Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.
 
void visit (ARAObjectVisitor &visitor) override
 Allows the retrieval of the concrete type of a model object.
 

Private Attributes

ListenerList< ARADocumentListenerlisteners
 

Detailed Description

Base class representing an ARA document.

@tags{ARA}

Member Typedef Documentation

◆ Listener

◆ PropertiesPtr

using juce::ARADocument::PropertiesPtr = ARA::PlugIn::PropertiesPtr<ARA::ARADocumentProperties>

Member Function Documentation

◆ addListener()

void juce::ARAListenableModelClass< ARADocumentListener >::addListener ( ARADocumentListener l)
inlineinherited

Subscribe l to notified by changes to the object.

Parameters
lThe listener instance.

◆ getAudioSources()

template<typename AudioSource_t = ARAAudioSource>
const std::vector< AudioSource_t * > & juce::ARADocument::getAudioSources ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::Document::getAudioSources() with the pointers within cast to ARAAudioSource*.

If you have overridden ARADocumentControllerSpecialisation::doCreateAudioSource(), then you can use the template parameter to cast the pointers to your subclass of ARAAudioSource.

◆ getChild()

ARAObject * juce::ARADocument::getChild ( size_t  index)
overridevirtual

Returns the child object associated with the given index.

The index should be smaller than the value returned by getNumChildren().

Note that the index of a particular object may change when the ARA model graph is edited.

Implements juce::ARAObject.

◆ getMusicalContexts()

template<typename MusicalContext_t = ARAMusicalContext>
const std::vector< MusicalContext_t * > & juce::ARADocument::getMusicalContexts ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::Document::getMusicalContexts() with the pointers within cast to ARAMusicalContext*.

If you have overridden ARADocumentControllerSpecialisation::doCreateMusicalContext(), then you can use the template parameter to cast the pointers to your subclass of ARAMusicalContext.

◆ getNumChildren()

size_t juce::ARADocument::getNumChildren ( ) const
overridevirtualnoexcept

Returns the number of ARA model objects aggregated by this object.

Objects that are merely referred to, but not aggregated by the current object are not included in this count, e.g. a referenced RegionSequence does not count as a child of the referring PlaybackRegion.

See the ARA documentation's ARA Model Graph Overview for more details.

Implements juce::ARAObject.

◆ getParent()

ARAObject * juce::ARADocument::getParent ( )
inlineoverridevirtual

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implements juce::ARAObject.

◆ getRegionSequences()

template<typename RegionSequence_t = ARARegionSequence>
const std::vector< RegionSequence_t * > & juce::ARADocument::getRegionSequences ( ) const
inlinenoexcept

Returns the result of ARA::PlugIn::Document::getRegionSequences() with the pointers within cast to ARARegionSequence*.

If you have overridden ARADocumentControllerSpecialisation::doCreateRegionSequence(), then you can use the template parameter to cast the pointers to your subclass of ARARegionSequence.

◆ notifyListeners()

void juce::ARAListenableModelClass< ARADocumentListener >::notifyListeners ( Callback &&  callback)
inlineinherited

Call the provided callback for each of the added listeners.

◆ removeListener()

void juce::ARAListenableModelClass< ARADocumentListener >::removeListener ( ARADocumentListener l)
inlineinherited

Unsubscribe l from object notifications.

Parameters
lThe listener instance.

◆ traverse()

template<typename Fn >
void juce::ARAObject::traverse ( Fn &&  fn)
inlineinherited

Implements a depth first traversal of the ARA model graph starting from the current object, and visiting its children recursively.

The provided function should accept a single ARAObject& parameter.

References juce::ARAObject::getChild(), juce::ARAObject::getNumChildren(), and juce::ARAObject::traverse().

Referenced by juce::ARAObject::traverse().

◆ visit()

void juce::ARADocument::visit ( ARAObjectVisitor visitor)
inlineoverridevirtual

Allows the retrieval of the concrete type of a model object.

To use this, create a new class derived from ARAObjectVisitor and override its functions depending on which concrete types you are interested in.

Calling this function inside the function passed to ARAObject::traverse() allows you to map the entire ARA model graph.

Implements juce::ARAObject.

References juce::ARAObjectVisitor::visitDocument().

Member Data Documentation

◆ listeners


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