26#include <wx/filename.h>
27#include <wx/translation.h>
34#define FMT_UNIMPLEMENTED wxT( "Plugin \"%s\" does not implement the \"%s\" function." )
35#define NOT_IMPLEMENTED( aCaller ) \
36 THROW_IO_ERROR( wxString::Format( FMT_UNIMPLEMENTED, \
37 GetName().GetData(), \
38 wxString::FromUTF8( aCaller ).GetData() ) );
51 wxString fileExt = wxFileName( aFileName ).GetExt().MakeLower();
53 for(
const std::string& ext : exts )
55 if( fileExt == wxString( ext ).Lower() )
70 SCH_SHEET* aAppendToMe,
const std::map<std::string, UTF8>* aProperties )
83 const std::map<std::string, UTF8>* aProperties )
91 const wxString& aLibraryPath,
92 const std::map<std::string, UTF8>* aProperties )
100 const wxString& aLibraryPath,
101 const std::map<std::string, UTF8>* aProperties )
109 const std::map<std::string, UTF8>* aProperties )
111 wxArrayString symbolNames;
117 const std::map<std::string, UTF8>* aProperties )
125 const std::map<std::string, UTF8>* aProperties )
133 const std::map<std::string, UTF8>* aProperties )
virtual void GetLibraryOptions(std::map< std::string, UTF8 > *aListToAppendTo) const
Append supported IO options to aListToAppenTo along with internationalized descriptions.
Define a library symbol object.
Holds all the data relating to one schematic.
virtual void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr)
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
virtual bool CanReadSchematicFile(const wxString &aFileName) const
Checks if this SCH_IO can read the specified schematic file.
virtual SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr)
Load information from some input file format that this SCH_IO implementation knows about,...
virtual void DeleteSymbol(const wxString &aLibraryPath, const wxString &aSymbolName, const std::map< std::string, UTF8 > *aProperties=nullptr)
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.
virtual void CheckLibrary(const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr)
Validate that the library at aLibraryPath is reachable and well-formed, without necessarily loading s...
virtual std::vector< LIB_SYMBOL * > GetImportedCachedLibrarySymbols()
Return the canonical symbol definitions produced by the last LoadSchematicFile().
virtual void SaveLibrary(const wxString &aFileName, const std::map< std::string, UTF8 > *aProperties=nullptr)
virtual LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aPartName, const std::map< std::string, UTF8 > *aProperties=nullptr)
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
virtual void GetLibraryOptions(std::map< std::string, UTF8 > *aListToAppendTo) const override
Append supported SCH_IO options to aListToAppenTo along with internationalized descriptions.
virtual void SaveSymbol(const wxString &aLibraryPath, std::unique_ptr< LIB_SYMBOL > aSymbol, const std::map< std::string, UTF8 > *aProperties=nullptr)
Write aSymbol to an existing library located at aLibraryPath.
virtual void SaveSchematicFile(const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const std::map< std::string, UTF8 > *aProperties=nullptr)
Write aSchematic to a storage file in a format that this SCH_IO implementation knows about,...
virtual const wxString & GetError() const
Return an error string to the caller.
virtual const IO_BASE::IO_FILE_DESC GetSchematicFileDesc() const
Returns schematic file description for the SCH_IO.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
#define NOT_IMPLEMENTED(aCaller)
Container that describes file type info.
std::vector< std::string > m_FileExtensions
Filter used for file pickers if m_IsFile is true.