Audacity 3.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ImportPlugin Class Referenceabstract

Base class for FlacImportPlugin, LOFImportPlugin, MP3ImportPlugin, OggImportPlugin and PCMImportPlugin. Gives API for sound file import. More...

#include <ImportPlugin.h>

Inheritance diagram for ImportPlugin:
[legend]
Collaboration diagram for ImportPlugin:
[legend]

Public Member Functions

virtual wxString GetPluginStringID ()=0
 
virtual TranslatableString GetPluginFormatDescription ()=0
 
virtual FileExtensions GetSupportedExtensions ()
 
virtual TranslatableString FailureHint () const
 User visible message suggesting what to do when a file type isn't recognized; default empty string. More...
 
bool SupportsExtension (const FileExtension &extension)
 
virtual std::unique_ptr< ImportFileHandleOpen (const FilePath &Filename, AudacityProject *)=0
 
virtual ~ImportPlugin ()
 

Protected Member Functions

 ImportPlugin (FileExtensions supportedExtensions)
 

Protected Attributes

const FileExtensions mExtensions
 

Detailed Description

Base class for FlacImportPlugin, LOFImportPlugin, MP3ImportPlugin, OggImportPlugin and PCMImportPlugin. Gives API for sound file import.

Definition at line 66 of file ImportPlugin.h.

Constructor & Destructor Documentation

◆ ~ImportPlugin()

ImportPlugin::~ImportPlugin ( )
virtualdefault

◆ ImportPlugin()

ImportPlugin::ImportPlugin ( FileExtensions  supportedExtensions)
protected

Definition at line 15 of file ImportPlugin.cpp.

15 :
16 mExtensions( std::move( supportedExtensions ) )
17{
18}
const FileExtensions mExtensions
Definition: ImportPlugin.h:103

Member Function Documentation

◆ FailureHint()

TranslatableString ImportPlugin::FailureHint ( ) const
virtual

User visible message suggesting what to do when a file type isn't recognized; default empty string.

Should end with one newline if not empty

Reimplemented in FFmpegImportPlugin.

Definition at line 33 of file ImportPlugin.cpp.

34{
35 return {};
36}

◆ GetPluginFormatDescription()

virtual TranslatableString ImportPlugin::GetPluginFormatDescription ( )
pure virtual

◆ GetPluginStringID()

virtual wxString ImportPlugin::GetPluginStringID ( )
pure virtual

◆ GetSupportedExtensions()

FileExtensions ImportPlugin::GetSupportedExtensions ( )
virtual

Definition at line 22 of file ImportPlugin.cpp.

23{
24 return mExtensions;
25}

References mExtensions.

◆ Open()

virtual std::unique_ptr< ImportFileHandle > ImportPlugin::Open ( const FilePath Filename,
AudacityProject  
)
pure virtual

◆ SupportsExtension()

bool ImportPlugin::SupportsExtension ( const FileExtension extension)

Definition at line 27 of file ImportPlugin.cpp.

28{
29 // Case-insensitive check if extension is supported
30 return mExtensions.Index(extension, false) != wxNOT_FOUND;
31}

References anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, and mExtensions.

Referenced by FFmpegImportPlugin::Open().

Here is the caller graph for this function:

Member Data Documentation

◆ mExtensions

const FileExtensions ImportPlugin::mExtensions
protected

Definition at line 103 of file ImportPlugin.h.

Referenced by GetSupportedExtensions(), and SupportsExtension().


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