82 static SCH_PLUGIN* FindPlugin( SCH_FILE_T aFileType );
95 static const wxString
ShowType( SCH_FILE_T aFileType );
100 static SCH_FILE_T
EnumFromStr(
const wxString& aFileType );
162 virtual const wxString
GetName()
const = 0;
263 const wxString& aLibraryPath,
286 const wxString& aLibraryPath,
310 virtual LIB_PART*
LoadSymbol(
const wxString& aLibraryPath,
const wxString& aPartName,
355 virtual void DeleteSymbol(
const wxString& aLibraryPath,
const wxString& aSymbolName,
441 virtual bool CheckHeader(
const wxString& aFileName );
451 virtual const wxString&
GetError()
const;
517 #endif // _SCH_IO_MGR_H_ SCH_IO_MGR is 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 CreateSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=NULL)
Create a new empty symbol library at aLibraryPath.
#define APIEXPORT
Macros which export functions from a DLL/DSO.
virtual bool DeleteSymbolLib(const wxString &aLibraryPath, const PROPERTIES *aProperties=NULL)
Delete an existing symbol library and returns true if successful, or if library does not exist return...
virtual const wxString GetLibraryFileExtension() const =0
Return the library file extension for the SCH_PLUGIN object.
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
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)
virtual SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=NULL, const PROPERTIES *aProperties=NULL)
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
static const wxString GetLibraryFileExtension(SCH_FILE_T aFileType)
Return the symbol library file extension (if any) for aFileType.
virtual void DeleteSymbol(const wxString &aLibraryPath, const wxString &aSymbolName, const PROPERTIES *aProperties=NULL)
Delete the entire LIB_PART associated with aAliasName from the library aLibraryPath.
void set(SCH_PLUGIN *aPlugin)
virtual void Save(const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const PROPERTIES *aProperties=NULL)
Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about,...
virtual const wxString GetName() const =0
Returns a brief hard coded name for this SCH_PLUGIN.
A name/value tuple with unique names and optional values.
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.
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.
virtual void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const PROPERTIES *aProperties=NULL)
Populate a list of LIB_PART alias names contained within the library aLibraryPath.
static const wxString GetFileExtension(SCH_FILE_T aFileType)
Return the schematic file extension for aFileType.
virtual LIB_PART * LoadSymbol(const wxString &aLibraryPath, const wxString &aPartName, const PROPERTIES *aProperties=NULL)
Load a LIB_PART object having aPartName from the aLibraryPath containing a library format that this S...
Define a library symbol object.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
SCH_PLUGIN_RELEASER(SCH_PLUGIN *aPlugin=NULL)
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...
virtual void SaveLibrary(const wxString &aFileName, const PROPERTIES *aProperties=NULL)
static SCH_FILE_T EnumFromStr(const wxString &aFileType)
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy",...
virtual const wxString & GetError() const
Return an error string to the caller.
virtual const wxString GetFileExtension() const =0
Returns 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.
virtual void SaveSymbol(const wxString &aLibraryPath, const LIB_PART *aSymbol, const PROPERTIES *aProperties=NULL)
Write aSymbol to an existing library located at aLibraryPath.
SCH_PLUGIN * operator ->() const
SCH_PLUGIN_RELEASER & operator=(SCH_PLUGIN_RELEASER &aOther)
Object used to load, save, search, and otherwise manipulate symbol library files.
static void ReleasePlugin(SCH_PLUGIN *aPlugin)
Release a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory.