Loading...
Searching...
No Matches
juce::ARAObject Class Referenceabstract

## Detailed Description

Common base class for all JUCE ARA model objects to aid with the discovery and traversal of the entire ARA model graph.

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

- juce_audio_processors_headless/utilities/ARA/juce_ARAModelObjects.h

Inheritance diagram for juce::ARAObject:

## Public Member Functions

virtual | ~ARAObject ()=default
| Destructor.
virtual size_t | getNumChildren () const noexcept=0
| Returns the number of ARA model objects aggregated by this object.
virtual ARAObject * | getChild (size_t index)=0
| Returns the child object associated with the given index.
virtual ARAObject * | getParent ()=0
| Returns the ARA model object that aggregates this object.
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.
virtual void | visit (ARAObjectVisitor &visitor)=0
| Allows the retrieval of the concrete type of a model object.

## Constructors and Destructors

## ~ARAObject()

virtual juce::ARAObject::~ARAObject | ( |  | ) |

virtual default

Destructor.

## Member Functions

## getNumChildren()

virtual size_t juce::ARAObject::getNumChildren | ( |  | ) | const

pure virtual noexcept

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.

Implemented in juce::ARAAudioModification, juce::ARAAudioSource, juce::ARADocument, juce::ARAMusicalContext, juce::ARAPlaybackRegion, and juce::ARARegionSequence.

Referenced by traverse().

## getChild()

virtual ARAObject * juce::ARAObject::getChild | ( | size_t | index | ) |

pure virtual

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.

Implemented in juce::ARAAudioModification, juce::ARAAudioSource, juce::ARADocument, juce::ARAMusicalContext, juce::ARAPlaybackRegion, and juce::ARARegionSequence.

References getChild().

Referenced by getChild(), and traverse().

## getParent()

virtual ARAObject * juce::ARAObject::getParent | ( |  | ) |

pure virtual

Returns the ARA model object that aggregates this object.

Returns nullptr for the ARADocument root object.

Implemented in juce::ARAAudioModification, juce::ARAAudioSource, juce::ARADocument, juce::ARAMusicalContext, juce::ARAPlaybackRegion, and juce::ARARegionSequence.

References getParent().

Referenced by getParent().

## traverse()

template<typename Fn>

void juce::ARAObject::traverse | ( | Fn && | fn | ) |

inline

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 getChild(), getNumChildren(), and traverse().

Referenced by traverse().

## visit()

virtual void juce::ARAObject::visit | ( | ARAObjectVisitor & | visitor | ) |

pure virtual

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.

Implemented in juce::ARAAudioModification, juce::ARAAudioSource, juce::ARADocument, juce::ARAMusicalContext, juce::ARAPlaybackRegion, and juce::ARARegionSequence.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited