tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_EditFileOperations.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14//==============================================================================
19{
20public:
23
24 juce::File getEditFile() const;
25
26 bool save (bool warnOfFailure, bool forceSaveEvenIfNotModified, bool offerToDiscardChanges);
27 bool saveAs (const juce::File&, bool forceOverwriteExisting = false);
28 bool saveAs();
29
30 bool writeToFile (const juce::File&, bool writeQuickBinaryVersion);
31
32 bool saveTempVersion (bool forceSaveEvenIfUnchanged);
33 void deleteTempVersion();
34 juce::File getTempVersionFile() const;
35 static juce::File getTempVersionOfEditFile (const juce::File&);
36 static void updateEditFiles();
37
38 juce::Time getTimeOfLastSave() const { return timeOfLastSave; }
39
40private:
41 Edit& edit;
42 juce::ValueTree state;
43
44 struct SharedDataPimpl;
46
47 juce::Time& timeOfLastSave;
48 EditSnapshot::Ptr& editSnapshot;
49};
50
51//==============================================================================
55
58
61
65
71
75
78
81
82
83}} // namespace tracktion { inline namespace engine
Contains methods for saving an Edit to a file.
The Tracktion Edit class!
EditRole
Enum used to determine what an Edit is being used for.
@ forExamining
Creates an Edit for examining (listing source files etc).
@ forEditing
Creates an Edit for normal use.
The Engine is the central class for all tracktion sessions.
An ID representing one of the items in a Project.
std::unique_ptr< Edit > loadEditForExamining(ProjectManager &pm, ProjectItemID itemID, Edit::EditRole role)
Uses the ProjectManager to find an Edit file and open it.
juce::ValueTree loadEditFromProjectManager(ProjectManager &pm, ProjectItemID itemID)
Uses the ProjectManager to find an Edit file and load it as a ValueTree.
juce::ValueTree loadEditFromFile(Engine &e, const juce::File &f, ProjectItemID itemID)
Legacy, will be deprecated soon.
juce::ValueTree createEmptyEdit(Engine &e)
Legacy, will be deprecated soon.
juce::ValueTree updateLegacyEdit(const juce::ValueTree &)
Converts old edit formats to the latest structure.