55 IO_FILE_DESC(
const wxString& aDescription,
const std::vector<std::string>& aFileExtensions,
56 const std::vector<std::string>& aExtsInFolder = {},
bool aIsFile =
true,
57 bool aCanRead =
true,
bool aCanWrite = true ) :
58 m_Description( aDescription ),
59 m_FileExtensions( aFileExtensions ), m_ExtensionsInDir( aExtsInFolder ),
60 m_IsFile( aIsFile ), m_CanRead( aCanRead ), m_CanWrite( aCanWrite )
69 wxString FileFilter()
const;
84 virtual bool IsPCB_IO()
const {
return false; }
123 virtual bool CanReadLibrary(
const wxString& aFileName )
const;
141 virtual void CreateLibrary(
const wxString& aLibraryPath,
142 const std::map<std::string, UTF8>* aProperties =
nullptr );
161 virtual bool DeleteLibrary(
const wxString& aLibraryPath,
162 const std::map<std::string, UTF8>* aProperties =
nullptr );
196 virtual bool IsLibraryWritable(
const wxString& aLibraryPath );
222 virtual void GetLibraryOptions( std::map<std::string, UTF8>* aListToAppendTo )
const;
241 virtual void Report(
const wxString& aText,
244 virtual void AdvanceProgressPhase();
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
virtual void LeakCacheAtExit()
Have the destructor leave the library cache unfreed.
virtual bool IsPCB_IO() const
Work-around for lack of dynamic_cast across compile units on Mac.
const wxString & GetName() const
Return a brief hard coded name for this IO interface.
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
wxString m_name
Name of the IO loader.
virtual const IO_FILE_DESC GetLibraryFileDesc() const
Get the descriptor for the individual library elements that this IO plugin operates on.
IO_BASE(const wxString &aName)
virtual bool SupportsConfigurationDialog() const
virtual ~IO_BASE()=default
virtual const IO_FILE_DESC GetLibraryDesc() const =0
Get the descriptor for the library container that this IO plugin operates on.
virtual void SetReporter(REPORTER *aReporter)
Set an optional reporter for warnings/errors.
virtual void SetProgressReporter(PROGRESS_REPORTER *aReporter)
Set an optional progress reporter.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
virtual void CancelLoad()
Ask a library load running on this plugin to end early.
virtual void StopBackgroundRefresh()
Stop and join any thread that reads other libraries through the library adapter.
virtual DIALOG_SHIM * CreateConfigurationDialog(wxWindow *aParent, const wxString &aLibraryPath)
virtual void ResumeLoad() noexcept
Called after the loads that were cancelled have ended, to clear what CancelLoad() left behind.
A progress reporter interface for use in multi-threaded environments.
A pure virtual class used to derive REPORTER objects from.
Container that describes file type info.
std::vector< std::string > m_ExtensionsInDir
In case of folders: extensions of files inside.
IO_FILE_DESC(const wxString &aDescription, const std::vector< std::string > &aFileExtensions, const std::vector< std::string > &aExtsInFolder={}, bool aIsFile=true, bool aCanRead=true, bool aCanWrite=true)
bool m_IsFile
Whether the library is a folder or a file.
wxString m_Description
Description shown in the file picker dialog.
bool m_CanWrite
Whether the IO can write this file type.
std::vector< std::string > m_FileExtensions
Filter used for file pickers if m_IsFile is true.
bool m_CanRead
Whether the IO can read this file type.