81 static SCH_PLUGIN* FindPlugin( SCH_FILE_T aFileType );
94 static const wxString
ShowType( SCH_FILE_T aFileType );
99 static SCH_FILE_T
EnumFromStr(
const wxString& aFileType );
161 virtual const wxString
GetName()
const = 0;
272 virtual void EnumerateSymbolLib( wxArrayString& aSymbolNameList,
const wxString& aLibraryPath,
295 const wxString& aLibraryPath,
364 virtual void DeleteSymbol(
const wxString& aLibraryPath,
const wxString& aSymbolName,
450 virtual bool CheckHeader(
const wxString& aFileName );
460 virtual const wxString&
GetError()
const;
526 #endif // _SCH_IO_MGR_H_ A factory which returns an instance of a SCH_PLUGIN.
static SCH_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath)
Return a plugin type given a symbol library using the file extension of aLibPath.
virtual void DeleteSymbol(const wxString &aLibraryPath, const wxString &aSymbolName, const PROPERTIES *aProperties=nullptr)
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.
#define APIEXPORT
Macros which export functions from a DLL/DSO.
virtual const wxString GetLibraryFileExtension() const =0
Return the library file extension for the SCH_PLUGIN object.
Holds all the data relating to one schematic.
Object used to load, save, search, and otherwise manipulate symbol library files.
A progress reporter interface for use in multi-threaded environments.
virtual SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const PROPERTIES *aProperties=nullptr)
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
static const wxString ShowType(SCH_FILE_T aFileType)
Return a brief name for a plugin, given aFileType enum.
SCH_PLUGIN_RELEASER(const SCH_PLUGIN_RELEASER &aOther)
static const wxString GetLibraryFileExtension(SCH_FILE_T aFileType)
Return the symbol library file extension (if any) for aFileType.
virtual void CreateSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Create a new empty symbol library at aLibraryPath.
virtual void SaveSymbol(const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const PROPERTIES *aProperties=nullptr)
Write aSymbol to an existing library located at aLibraryPath.
void set(SCH_PLUGIN *aPlugin)
A pure virtual class used to derive REPORTER objects from.
virtual const wxString GetName() const =0
Return a brief hard coded name for this SCH_PLUGIN.
A name/value tuple with unique names and optional values.
Define a library symbol object.
virtual bool CheckHeader(const wxString &aFileName)
Return true if the first line in aFileName begins with the expected header.
DEFINE_ENUM_VECTOR(SCH_FILE_T, { SCH_LEGACY, SCH_KICAD, SCH_ALTIUM, SCH_CADSTAR_ARCHIVE, SCH_EAGLE, SCH_FILE_UNKNOWN }) APIEXPORT static SCH_PLUGIN *FindPlugin(SCH_FILE_T aFileType)
A set of file types that the SCH_IO_MGR knows about, and for which there has been a plugin written.
SCH_PLUGIN_RELEASER(SCH_PLUGIN *aPlugin=nullptr)
static SCH_FILE_T GuessPluginTypeFromSchPath(const wxString &aSchematicPath)
Return a plugin type given a schematic using the file extension of aSchematicPath.
virtual int GetModifyHash() const =0
Return the modification hash from the library cache.
Base class that schematic file and library loading and saving plugins should derive from.
static const wxString GetFileExtension(SCH_FILE_T aFileType)
Return the schematic file extension for aFileType.
virtual void SetReporter(REPORTER *aReporter)
Set an optional reporter for warnings/errors.
virtual bool DeleteSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Delete an existing symbol library and returns true if successful, or if library does not exist return...
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const PROPERTIES *aProperties=nullptr)
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Helper object to release a SCH_PLUGIN in the context of a potential thrown exception through its dest...
static SCH_FILE_T EnumFromStr(const wxString &aFileType)
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy",...
virtual void Save(const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const PROPERTIES *aProperties=nullptr)
Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about,...
virtual const wxString & GetError() const
Return an error string to the caller.
virtual void SetProgressReporter(PROGRESS_REPORTER *aReporter)
Set an optional progress reporter.
virtual const wxString GetFileExtension() const =0
Return the file extension for the SCH_PLUGIN.
virtual bool IsSymbolLibWritable(const wxString &aLibraryPath)
Return true if the library at aLibraryPath is writable.
virtual void SymbolLibOptions(PROPERTIES *aListToAppendTo) const
Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions.
SCH_PLUGIN * operator ->() const
SCH_PLUGIN_RELEASER & operator=(SCH_PLUGIN_RELEASER &aOther)
virtual LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aPartName, const PROPERTIES *aProperties=nullptr)
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
virtual void SaveLibrary(const wxString &aFileName, const PROPERTIES *aProperties=nullptr)
static void ReleasePlugin(SCH_PLUGIN *aPlugin)
Release a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory.