|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
Holds a snapshot of an Edit file of the last time it was saved. More...
#include "tracktion_EditSnapshot.h"
Classes | |
| struct | Listener |
| struct | ListHolder |
| struct | Marker |
Public Types | |
| using | Ptr = juce::ReferenceCountedObjectPtr< EditSnapshot > |
Public Member Functions | |
| ProjectItemID | getID () const noexcept |
| Returns the ProjectItemID. | |
| juce::File | getFile () const |
| Returns the File if this was created from one. | |
| juce::ValueTree | getState () noexcept |
| Returns the source Xml. | |
| void | setState (juce::ValueTree, TimeDuration editLength) |
| Sets the Edit XML that the XmlEdit should refer to. | |
| bool | isValid () const |
| Returns true if the current source is a valid Edit. | |
| void | refreshFromProjectManager () |
| Looks in the ProjectManager for the relevant ProjectItem and updates it's state to reflect this. | |
| void | refreshCacheAndNotifyListeners () |
| Refreshes the cached properties and calls any listeners. | |
| juce::ReferenceCountedArray< EditSnapshot > | getNestedEditObjects () |
| deals only with snapshots so it's relatively fast. | |
| juce::String | getName () const |
| int | getNumTracks () const |
| int | getNumAudioTracks () const |
| int | getIndexOfTrackID (EditItemID trackID) const |
| juce::String | getTrackName (int index) const |
| juce::String | getTrackNameFromID (EditItemID trackID) const |
| bool | isAudioTrack (int trackIndex) const |
| bool | isTrackMuted (int trackIndex) const |
| bool | isTrackSoloed (int trackIndex) const |
| bool | isTrackSoloIsolated (int trackIndex) const |
| int | audioToGlobalTrackIndex (int audioIndex) const |
| TimeDuration | getLength () const |
| TimePosition | getMarkIn () const |
| TimePosition | getMarkOut () const |
| bool | areMarksActive () const |
| double | getTempo () const |
| int | getTimeSigNumerator () const |
| int | getTimeSigDenominator () const |
| int | getPitch () const |
| const juce::Array< Marker > & | getMarkers () const |
| const juce::Array< EditItemID > & | getTracks () const |
| const juce::Array< ProjectItemID > & | getEditClips () const |
| const juce::Array< ProjectItemID > & | getClipsSourceIDs () const |
| HashCode | getHash () const |
| void | addListener (Listener *l) |
| void | removeListener (Listener *l) |
Public Member Functions inherited from juce::ReferenceCountedObject | |
| void | incReferenceCount () noexcept |
| void | decReferenceCount () noexcept |
| bool | decReferenceCountWithoutDeleting () noexcept |
| int | getReferenceCount () const noexcept |
Static Public Member Functions | |
| static Ptr | getEditSnapshot (Engine &, ProjectItemID) |
Public Attributes | |
| Engine & | engine |
Additional Inherited Members | |
Protected Member Functions inherited from juce::ReferenceCountedObject | |
| ReferenceCountedObject (const ReferenceCountedObject &) noexcept | |
| ReferenceCountedObject (ReferenceCountedObject &&) noexcept | |
| ReferenceCountedObject & | operator= (const ReferenceCountedObject &) noexcept |
| ReferenceCountedObject & | operator= (ReferenceCountedObject &&) noexcept |
| void | resetReferenceCount () noexcept |
Holds a snapshot of an Edit file of the last time it was saved.
Definition at line 18 of file tracktion_EditSnapshot.h.
| struct tracktion::engine::EditSnapshot::ListHolder |
Definition at line 51 of file tracktion_EditSnapshot.cpp.
| Class Members | ||
|---|---|---|
| SharedResourcePointer< EditSnapshotList > | list | |
| struct tracktion::engine::EditSnapshot::Marker |
Definition at line 27 of file tracktion_EditSnapshot.h.
| Class Members | ||
|---|---|---|
| Colour | colour | |
| String | name | |
| TimeRange | time | |
Definition at line 22 of file tracktion_EditSnapshot.h.
| tracktion::engine::EditSnapshot::~EditSnapshot | ( | ) |
Definition at line 81 of file tracktion_EditSnapshot.cpp.
| void tracktion::engine::EditSnapshot::addListener | ( | Listener * | l | ) |
Definition at line 107 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::areMarksActive | ( | ) | const |
Definition at line 87 of file tracktion_EditSnapshot.h.
Definition at line 197 of file tracktion_EditSnapshot.cpp.
| const juce::Array< ProjectItemID > & tracktion::engine::EditSnapshot::getClipsSourceIDs | ( | ) | const |
Definition at line 97 of file tracktion_EditSnapshot.h.
| const juce::Array< ProjectItemID > & tracktion::engine::EditSnapshot::getEditClips | ( | ) | const |
Definition at line 96 of file tracktion_EditSnapshot.h.
|
static |
Definition at line 57 of file tracktion_EditSnapshot.cpp.
| juce::File tracktion::engine::EditSnapshot::getFile | ( | ) | const |
Returns the File if this was created from one.
Definition at line 41 of file tracktion_EditSnapshot.h.
| HashCode tracktion::engine::EditSnapshot::getHash | ( | ) | const |
Definition at line 98 of file tracktion_EditSnapshot.h.
|
noexcept |
Returns the ProjectItemID.
Definition at line 38 of file tracktion_EditSnapshot.h.
| int tracktion::engine::EditSnapshot::getIndexOfTrackID | ( | EditItemID | trackID | ) | const |
Definition at line 75 of file tracktion_EditSnapshot.h.
| TimeDuration tracktion::engine::EditSnapshot::getLength | ( | ) | const |
Definition at line 84 of file tracktion_EditSnapshot.h.
| const juce::Array< Marker > & tracktion::engine::EditSnapshot::getMarkers | ( | ) | const |
Definition at line 94 of file tracktion_EditSnapshot.h.
| TimePosition tracktion::engine::EditSnapshot::getMarkIn | ( | ) | const |
Definition at line 85 of file tracktion_EditSnapshot.h.
| TimePosition tracktion::engine::EditSnapshot::getMarkOut | ( | ) | const |
Definition at line 86 of file tracktion_EditSnapshot.h.
| juce::String tracktion::engine::EditSnapshot::getName | ( | ) | const |
Definition at line 72 of file tracktion_EditSnapshot.h.
| juce::ReferenceCountedArray< EditSnapshot > tracktion::engine::EditSnapshot::getNestedEditObjects | ( | ) |
deals only with snapshots so it's relatively fast.
Definition at line 310 of file tracktion_EditSnapshot.cpp.
| int tracktion::engine::EditSnapshot::getNumAudioTracks | ( | ) | const |
Definition at line 74 of file tracktion_EditSnapshot.h.
| int tracktion::engine::EditSnapshot::getNumTracks | ( | ) | const |
Definition at line 73 of file tracktion_EditSnapshot.h.
| int tracktion::engine::EditSnapshot::getPitch | ( | ) | const |
Definition at line 92 of file tracktion_EditSnapshot.h.
|
noexcept |
Returns the source Xml.
Definition at line 44 of file tracktion_EditSnapshot.h.
| double tracktion::engine::EditSnapshot::getTempo | ( | ) | const |
Definition at line 89 of file tracktion_EditSnapshot.h.
| int tracktion::engine::EditSnapshot::getTimeSigDenominator | ( | ) | const |
Definition at line 91 of file tracktion_EditSnapshot.h.
| int tracktion::engine::EditSnapshot::getTimeSigNumerator | ( | ) | const |
Definition at line 90 of file tracktion_EditSnapshot.h.
| juce::String tracktion::engine::EditSnapshot::getTrackName | ( | int | index | ) | const |
Definition at line 76 of file tracktion_EditSnapshot.h.
| juce::String tracktion::engine::EditSnapshot::getTrackNameFromID | ( | EditItemID | trackID | ) | const |
Definition at line 77 of file tracktion_EditSnapshot.h.
| const juce::Array< EditItemID > & tracktion::engine::EditSnapshot::getTracks | ( | ) | const |
Definition at line 95 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::isAudioTrack | ( | int | trackIndex | ) | const |
Definition at line 78 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::isTrackMuted | ( | int | trackIndex | ) | const |
Definition at line 79 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::isTrackSoloed | ( | int | trackIndex | ) | const |
Definition at line 80 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::isTrackSoloIsolated | ( | int | trackIndex | ) | const |
Definition at line 81 of file tracktion_EditSnapshot.h.
| bool tracktion::engine::EditSnapshot::isValid | ( | ) | const |
Returns true if the current source is a valid Edit.
Definition at line 97 of file tracktion_EditSnapshot.cpp.
| void tracktion::engine::EditSnapshot::refreshCacheAndNotifyListeners | ( | ) |
Refreshes the cached properties and calls any listeners.
Definition at line 102 of file tracktion_EditSnapshot.cpp.
| void tracktion::engine::EditSnapshot::refreshFromProjectManager | ( | ) |
Looks in the ProjectManager for the relevant ProjectItem and updates it's state to reflect this.
Definition at line 210 of file tracktion_EditSnapshot.cpp.
| void tracktion::engine::EditSnapshot::removeListener | ( | Listener * | l | ) |
Definition at line 108 of file tracktion_EditSnapshot.h.
| void tracktion::engine::EditSnapshot::setState | ( | juce::ValueTree | newState, |
| TimeDuration | editLength | ||
| ) |
Sets the Edit XML that the XmlEdit should refer to.
This will take ownership of the XmlElement so don't hang on to it. Once this is set you can retrieve the Xml for saving etc. using getXml(). As the length isn't stored in the Xml we need to provide it.
Note that this DOES NOT update the cached properties, once the Xml has been set call refreshCacheAndSave to update these. Although this seems a bit convoluted it's how the temp Edit files work so we need to follow this. It means that this will hold up-to-date Xml but only cached properties of the last save which can be used in things like EditClips.
Definition at line 87 of file tracktion_EditSnapshot.cpp.
| Engine& tracktion::engine::EditSnapshot::engine |
Definition at line 110 of file tracktion_EditSnapshot.h.