|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
A tracktion project. More...
#include "tracktion_Project.h"
Public Types | |
| enum | NagMode { nagAsk , nagAutoYes , nagAutoNo } |
| General enum for requests that have a project setting and so can return true without asking the user. More... | |
| enum | ProjectSortType { SortByName , SortByDesc , SortByType , SortByLength , SortBySize , SortByModified , SortByCreated } |
| using | Ptr = juce::ReferenceCountedObjectPtr< Project > |
Public Types inherited from tracktion::engine::Selectable | |
| using | WeakRef = juce::WeakReference< Selectable > |
Public Member Functions | |
| bool | save () |
| only saves if a change has been made since last time | |
| void | handleAsyncUpdate () override |
| bool | isValid () const |
| true if it's got a proper project ID. | |
| bool | isReadOnly () const |
| bool | isTemporary () const |
| int | getProjectID () const |
| juce::String | getName () const |
| juce::String | getDescription () const |
| const juce::File & | getProjectFile () const noexcept |
| juce::File | getDefaultDirectory () const |
| juce::File | getDirectoryForMedia (ProjectItem::Category category) const |
| void | setName (const juce::String &newName) |
| void | setDescription (const juce::String &newDesc) |
| void | createNewProjectId () |
| juce::String | getProjectProperty (const juce::String &name) const |
| void | setProjectProperty (const juce::String &name, const juce::String &value) |
| void | refreshProjectPropertiesFromFile () |
| bool | isLibraryProject () const |
| bool | askAboutTempoDetect (const juce::File &, bool &shouldSetAutoTempo) const |
| juce::Array< ProjectItemID > | findOrphanItems () |
| int | getNumProjectItems () |
| ProjectItemID | getProjectItemID (int index) |
| juce::Array< ProjectItemID > | getAllProjectItemIDs () const |
| juce::Array< int > | getAllItemIDs () const |
| ProjectItem::Ptr | getProjectItemAt (int index) |
| juce::Array< ProjectItem::Ptr > | getAllProjectItems () |
| int | getIndexOf (ProjectItemID) const |
| ProjectItem::Ptr | getProjectItemForID (ProjectItemID) |
| ProjectItem::Ptr | getProjectItemForFile (const juce::File &file) |
| ProjectItem::Ptr | createNewItem (const juce::File &fileToReference, const juce::String &type, const juce::String &name, const juce::String &description, const ProjectItem::Category cat, bool atTopOfList) |
| Returns an existing object if there is one. | |
| bool | removeProjectItem (ProjectItemID, bool deleteSourceMaterial) |
| void | moveProjectItem (int indexToMoveFrom, int indexToMoveTo) |
| ProjectItem::Ptr | createNewEdit () |
| void | redirectIDsFromProject (int oldProjId, int newProjId) |
| Tells all exportables in all edits to change this project ID. | |
| void | mergeArchiveContents (const juce::File &archiveFile) |
| void | mergeOtherProjectIntoThis (const juce::File &otherProject) |
| void | refreshFolderStructure () |
| makes sure all media is in the correct sub folder | |
| void | createDefaultFolders () |
| void | searchFor (juce::Array< ProjectItemID > &results, SearchOperation &) |
| this will load the keyword table, and do a search | |
| juce::String | getSelectableDescription () override |
| Subclasses must return a description of what they are. | |
| void | lockFile () |
| Stops anyone writing/moving the project file. | |
| void | unlockFile () |
Public Member Functions inherited from juce::ReferenceCountedObject | |
| void | incReferenceCount () noexcept |
| void | decReferenceCount () noexcept |
| bool | decReferenceCountWithoutDeleting () noexcept |
| int | getReferenceCount () const noexcept |
Public Member Functions inherited from tracktion::engine::Selectable | |
| virtual void | selectionStatusChanged (bool isNowSelected) |
| Can be overridden to tell this object that it has just been selected or deselected. | |
| virtual void | selectableAboutToBeDeleted () |
| Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. | |
| void | addListener (SelectableListener *) |
| void | removeListener (SelectableListener *) |
| void | addSelectableListener (SelectableListener *) |
| void | removeSelectableListener (SelectableListener *) |
| void | cancelAnyPendingUpdates () |
| If changed() has been called, this will cancel any pending async change notificaions. | |
| void | deselect () |
| void | propertiesChanged () |
| void | notifyListenersOfDeletion () |
| WeakRef | getWeakRef () |
Public Attributes | |
| Engine & | engine |
| ProjectManager & | projectManager |
Public Attributes inherited from tracktion::engine::Selectable | |
| WeakRef::Master | masterReference |
Friends | |
| class | ProjectItem |
| class | ProjectManager |
Additional Inherited Members | |
Static Public Member Functions inherited from tracktion::engine::Selectable | |
| static void | initialise () |
| static bool | isSelectableValid (const Selectable *) noexcept |
| checks whether this object has been deleted. | |
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 |
A tracktion project.
The projects contain a set of ProjectItems to represent each item in it, which may be edits, wave files, etc.
Originally these were designed to hold huge numbers of items (so I could use them for holding sound-libraries and searching them), so some of the implementation might seem like overkill, such as the reverse-index text search stuff.
Definition at line 26 of file tracktion_Project.h.
Definition at line 141 of file tracktion_Project.h.
General enum for requests that have a project setting and so can return true without asking the user.
| Enumerator | |
|---|---|
| nagAsk | Should ask user. |
| nagAutoYes | Should do task automatically. |
| nagAutoNo | Should not do task automatically. |
Definition at line 103 of file tracktion_Project.h.
| enum tracktion::engine::Project::ProjectSortType |
Definition at line 119 of file tracktion_Project.h.
|
override |
Definition at line 35 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::askAboutTempoDetect | ( | const juce::File & | f, |
| bool & | shouldSetAutoTempo | ||
| ) | const |
Definition at line 808 of file tracktion_Project.cpp.
| void tracktion::engine::Project::createDefaultFolders | ( | ) |
Definition at line 862 of file tracktion_Project.cpp.
| ProjectItem::Ptr tracktion::engine::Project::createNewEdit | ( | ) |
Definition at line 657 of file tracktion_Project.cpp.
| ProjectItem::Ptr tracktion::engine::Project::createNewItem | ( | const juce::File & | fileToReference, |
| const juce::String & | type, | ||
| const juce::String & | name, | ||
| const juce::String & | description, | ||
| const ProjectItem::Category | cat, | ||
| bool | atTopOfList | ||
| ) |
Returns an existing object if there is one.
If not, it will use the given name and description to create a new one
Definition at line 531 of file tracktion_Project.cpp.
| void tracktion::engine::Project::createNewProjectId | ( | ) |
Definition at line 354 of file tracktion_Project.cpp.
| juce::Array< ProjectItemID > tracktion::engine::Project::findOrphanItems | ( | ) |
Definition at line 775 of file tracktion_Project.cpp.
| juce::Array< int > tracktion::engine::Project::getAllItemIDs | ( | ) | const |
Definition at line 422 of file tracktion_Project.cpp.
| juce::Array< ProjectItemID > tracktion::engine::Project::getAllProjectItemIDs | ( | ) | const |
Definition at line 432 of file tracktion_Project.cpp.
| juce::Array< ProjectItem::Ptr > tracktion::engine::Project::getAllProjectItems | ( | ) |
Definition at line 461 of file tracktion_Project.cpp.
| juce::File tracktion::engine::Project::getDefaultDirectory | ( | ) | const |
Definition at line 652 of file tracktion_Project.cpp.
| juce::String tracktion::engine::Project::getDescription | ( | ) | const |
Definition at line 321 of file tracktion_Project.cpp.
| juce::File tracktion::engine::Project::getDirectoryForMedia | ( | ProjectItem::Category | category | ) | const |
Definition at line 627 of file tracktion_Project.cpp.
| int tracktion::engine::Project::getIndexOf | ( | ProjectItemID | mo | ) | const |
Definition at line 501 of file tracktion_Project.cpp.
| juce::String tracktion::engine::Project::getName | ( | ) | const |
Definition at line 316 of file tracktion_Project.cpp.
| int tracktion::engine::Project::getNumProjectItems | ( | ) |
Definition at line 407 of file tracktion_Project.cpp.
|
noexcept |
Definition at line 48 of file tracktion_Project.h.
| int tracktion::engine::Project::getProjectID | ( | ) | const |
Definition at line 298 of file tracktion_Project.cpp.
| ProjectItem::Ptr tracktion::engine::Project::getProjectItemAt | ( | int | index | ) |
Definition at line 444 of file tracktion_Project.cpp.
| ProjectItem::Ptr tracktion::engine::Project::getProjectItemForFile | ( | const juce::File & | file | ) |
Definition at line 484 of file tracktion_Project.cpp.
| ProjectItem::Ptr tracktion::engine::Project::getProjectItemForID | ( | ProjectItemID | targetId | ) |
Definition at line 478 of file tracktion_Project.cpp.
| ProjectItemID tracktion::engine::Project::getProjectItemID | ( | int | index | ) |
Definition at line 412 of file tracktion_Project.cpp.
| juce::String tracktion::engine::Project::getProjectProperty | ( | const juce::String & | name | ) | const |
Definition at line 303 of file tracktion_Project.cpp.
|
overridevirtual |
Subclasses must return a description of what they are.
Implements tracktion::engine::Selectable.
Definition at line 802 of file tracktion_Project.cpp.
|
overridevirtual |
Implements juce::AsyncUpdater.
Definition at line 173 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::isLibraryProject | ( | ) | const |
Definition at line 395 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::isReadOnly | ( | ) | const |
Definition at line 293 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::isTemporary | ( | ) | const |
Definition at line 43 of file tracktion_Project.h.
| bool tracktion::engine::Project::isValid | ( | ) | const |
true if it's got a proper project ID.
Definition at line 288 of file tracktion_Project.cpp.
| void tracktion::engine::Project::lockFile | ( | ) |
Stops anyone writing/moving the project file.
Definition at line 42 of file tracktion_Project.cpp.
| void tracktion::engine::Project::mergeArchiveContents | ( | const juce::File & | archiveFile | ) |
Definition at line 709 of file tracktion_Project.cpp.
| void tracktion::engine::Project::mergeOtherProjectIntoThis | ( | const juce::File & | otherProject | ) |
Definition at line 746 of file tracktion_Project.cpp.
Definition at line 517 of file tracktion_Project.cpp.
Tells all exportables in all edits to change this project ID.
Definition at line 368 of file tracktion_Project.cpp.
| void tracktion::engine::Project::refreshFolderStructure | ( | ) |
makes sure all media is in the correct sub folder
Definition at line 872 of file tracktion_Project.cpp.
| void tracktion::engine::Project::refreshProjectPropertiesFromFile | ( | ) |
Definition at line 93 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::removeProjectItem | ( | ProjectItemID | item, |
| bool | deleteSourceMaterial | ||
| ) |
Definition at line 593 of file tracktion_Project.cpp.
| bool tracktion::engine::Project::save | ( | ) |
only saves if a change has been made since last time
Definition at line 178 of file tracktion_Project.cpp.
| void tracktion::engine::Project::searchFor | ( | juce::Array< ProjectItemID > & | results, |
| SearchOperation & | searchOp | ||
| ) |
this will load the keyword table, and do a search
Definition at line 687 of file tracktion_Project.cpp.
| void tracktion::engine::Project::setDescription | ( | const juce::String & | newDesc | ) |
Definition at line 349 of file tracktion_Project.cpp.
| void tracktion::engine::Project::setName | ( | const juce::String & | newName | ) |
Definition at line 326 of file tracktion_Project.cpp.
| void tracktion::engine::Project::setProjectProperty | ( | const juce::String & | name, |
| const juce::String & | value | ||
| ) |
Definition at line 309 of file tracktion_Project.cpp.
| void tracktion::engine::Project::unlockFile | ( | ) |
Definition at line 48 of file tracktion_Project.cpp.
|
friend |
Definition at line 147 of file tracktion_Project.h.
|
friend |
Definition at line 148 of file tracktion_Project.h.
| Engine& tracktion::engine::Project::engine |
Definition at line 143 of file tracktion_Project.h.
| ProjectManager& tracktion::engine::Project::projectManager |
Definition at line 144 of file tracktion_Project.h.