TracktionEngine
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
tracktion::engine::SourceFileReference Class Reference

This class wraps a string that is generally held in a 'source' property, and which is a reference to some sort of file, either in the form of a local filename or as a project ID that can be resolved. More...

Public Member Functions

 SourceFileReference (Edit &, juce::ValueTree &, const juce::Identifier &prop)
 
 ~SourceFileReference ()
 
juce::File getFile () const
 
bool isUsingProjectReference () const
 
ProjectItemID getSourceProjectItemID () const
 
ProjectItem::Ptr getSourceProjectItem () const
 
void setToDirectFileReference (const juce::File &, bool useRelativePath)
 
void setToProjectFileReference (const juce::File &, bool updateProjectItem)
 Points this source at a new file via a project item. More...
 
void setToProjectFileReference (ProjectItemID)
 

Static Public Member Functions

static juce::String findPathFromFile (Edit &, const juce::File &, bool useRelativePath)
 
static juce::File findFileFromString (Edit &, const juce::String &source)
 

Public Attributes

Editedit
 
juce::CachedValue< juce::String > source
 

Detailed Description

This class wraps a string that is generally held in a 'source' property, and which is a reference to some sort of file, either in the form of a local filename or as a project ID that can be resolved.

Constructor & Destructor Documentation

◆ SourceFileReference()

tracktion::engine::SourceFileReference::SourceFileReference ( Edit ,
juce::ValueTree &  ,
const juce::Identifier &  prop 
)

◆ ~SourceFileReference()

tracktion::engine::SourceFileReference::~SourceFileReference ( )

Member Function Documentation

◆ getFile()

juce::File tracktion::engine::SourceFileReference::getFile ( ) const

◆ isUsingProjectReference()

bool tracktion::engine::SourceFileReference::isUsingProjectReference ( ) const

◆ getSourceProjectItemID()

ProjectItemID tracktion::engine::SourceFileReference::getSourceProjectItemID ( ) const

◆ getSourceProjectItem()

ProjectItem::Ptr tracktion::engine::SourceFileReference::getSourceProjectItem ( ) const

◆ setToDirectFileReference()

void tracktion::engine::SourceFileReference::setToDirectFileReference ( const juce::File &  ,
bool  useRelativePath 
)

◆ setToProjectFileReference() [1/2]

void tracktion::engine::SourceFileReference::setToProjectFileReference ( const juce::File &  ,
bool  updateProjectItem 
)

Points this source at a new file via a project item.

If updateProjectItem is true and there isn't already a media id for this file, it'll create one and add it to the project, or will update the current ProjectItem if it doesn't yet point to a real file.

◆ setToProjectFileReference() [2/2]

void tracktion::engine::SourceFileReference::setToProjectFileReference ( ProjectItemID  )

◆ findPathFromFile()

static juce::String tracktion::engine::SourceFileReference::findPathFromFile ( Edit ,
const juce::File &  ,
bool  useRelativePath 
)
static

◆ findFileFromString()

static juce::File tracktion::engine::SourceFileReference::findFileFromString ( Edit ,
const juce::String &  source 
)
static

Member Data Documentation

◆ edit

Edit& tracktion::engine::SourceFileReference::edit

◆ source

juce::CachedValue<juce::String> tracktion::engine::SourceFileReference::source

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