JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::ARAHostModel::PlaybackRegion Struct Reference

Helper class for the host side implementation of the ARA PlaybackRegion model object. More...

Collaboration diagram for juce::ARAHostModel::PlaybackRegion:

Public Member Functions

 PlaybackRegion (ARA::ARAPlaybackRegionHostRef hostRef, ARA::Host::DocumentController &dc, AudioModification &m, const ARA::ARAPlaybackRegionProperties &props)
 
 ~PlaybackRegion ()
 
void addListener (DeletionListener &x)
 Adds a DeletionListener object that will be notified when the PlaybackRegion object is deleted.
 
auto & getAudioModification () const
 Returns the AudioModification containing this PlaybackRegion.
 
DeletionListenergetDeletionListener () const noexcept
 
ARA::ARAPlaybackRegionRef getPluginRef () const noexcept
 Returns the plugin side reference to the PlaybackRegion.
 
void update (const ARA::ARAPlaybackRegionProperties &props)
 Updates the state of the corresponding ARA model object.
 

Static Public Member Functions

static constexpr auto getEmptyProperties ()
 Returns an ARA versioned struct with the structSize correctly set for the currently used SDK version.
 

Private Attributes

std::unique_ptr< Impl > impl
 

Detailed Description

Helper class for the host side implementation of the ARA PlaybackRegion model object.

Its intended use is to add a member variable of this type to your host side PlaybackRegion implementation. Then it provides a RAII approach to managing the lifetime of the corresponding objects created inside the DocumentController. When the host side object is instantiated an ARA model object is also created in the DocumentController. When the host side object is deleted it will be removed from the DocumentController as well.

The class will automatically put the DocumentController into editable state for operations that mandate this e.g. creation, deletion or updating.

You can encapsulate multiple such operations into a scope with an ARAEditGuard in order to invoke the editable state of the DocumentController only once.

@tags{ARA}

Constructor & Destructor Documentation

◆ PlaybackRegion()

juce::ARAHostModel::PlaybackRegion::PlaybackRegion ( ARA::ARAPlaybackRegionHostRef  hostRef,
ARA::Host::DocumentController &  dc,
AudioModification m,
const ARA::ARAPlaybackRegionProperties &  props 
)

◆ ~PlaybackRegion()

juce::ARAHostModel::PlaybackRegion::~PlaybackRegion ( )

Member Function Documentation

◆ addListener()

void juce::ARAHostModel::PlaybackRegion::addListener ( DeletionListener x)

◆ getAudioModification()

auto & juce::ARAHostModel::PlaybackRegion::getAudioModification ( ) const

Returns the AudioModification containing this PlaybackRegion.

◆ getDeletionListener()

◆ getEmptyProperties()

static constexpr auto juce::ARAHostModel::PlaybackRegion::getEmptyProperties ( )
inlinestaticconstexpr

Returns an ARA versioned struct with the structSize correctly set for the currently used SDK version.

You should leave structSize unchanged, and fill out the rest of the fields appropriately for the host implementation of the ARA model object.

References juce::makeARASizedStruct().

◆ getPluginRef()

ARA::ARAPlaybackRegionRef juce::ARAHostModel::PlaybackRegion::getPluginRef ( ) const
noexcept

◆ update()

void juce::ARAHostModel::PlaybackRegion::update ( const ARA::ARAPlaybackRegionProperties &  props)

Updates the state of the corresponding ARA model object.

Places the DocumentController in editable state.

You can use getEmptyProperties() to acquire a properties struct where the structSize field has already been correctly set.

Member Data Documentation

◆ impl

std::unique_ptr<Impl> juce::ARAHostModel::PlaybackRegion::impl
private

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