Audacity 3.2.0
ImportPlugin.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5ImportPlugin.cpp
6
7Paul Licameli split from Import.cpp
8
9**********************************************************************/
10
11#include "ImportPlugin.h"
12
13#include <wx/filename.h>
14
16 mExtensions( std::move( supportedExtensions ) )
17{
18}
19
21
23{
24 return mExtensions;
25}
26
28{
29 // Case-insensitive check if extension is supported
30 return mExtensions.Index(extension, false) != wxNOT_FOUND;
31}
32
34{
35 return {};
36}
37
38
40
42: mFilename(filename)
43{
44}
45
47{
48 return mFilename;
49}
50
52{
53 if(!mStopped)
54 mCancelled = true;
55}
56
58{
59 if(!mCancelled)
60 mStopped = true;
61}
62
64{
65 mCancelled = false;
66 mStopped = false;
67}
68
70{
71 return mCancelled;
72}
73
74bool ImportFileHandleEx::IsStopped() const noexcept
75{
76 return mStopped;
77}
78
80{
81 return {};
82}
wxString FileExtension
File extension, not including any leading dot.
Definition: Identifier.h:224
The interface that all file import "plugins" (if you want to call them that) must implement....
wxString FilePath
Definition: Project.h:21
static wxCharBuffer mFilename
Definition: SelectFile.cpp:38
void Stop() override
bool IsStopped() const noexcept
FilePath GetFilename() const override
void Cancel() override
ImportFileHandleEx(const FilePath &filename)
bool IsCancelled() const noexcept
virtual TranslatableString GetErrorMessage() const
virtual ~ImportFileHandle()
virtual ~ImportPlugin()
virtual TranslatableString FailureHint() const
User visible message suggesting what to do when a file type isn't recognized; default empty string.
const FileExtensions mExtensions
Definition: ImportPlugin.h:103
virtual FileExtensions GetSupportedExtensions()
ImportPlugin(FileExtensions supportedExtensions)
bool SupportsExtension(const FileExtension &extension)
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
STL namespace.