KiCad PCB EDA Suite
|
A factory which returns an instance of a SCH_PLUGIN. More...
#include <sch_io_mgr.h>
Public Member Functions | |
DEFINE_ENUM_VECTOR (SCH_FILE_T, { SCH_LEGACY, SCH_KICAD, SCH_ALTIUM, SCH_CADSTAR_ARCHIVE, SCH_EAGLE, SCH_DATABASE, SCH_LTSPICE, 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. More... | |
Static Public Member Functions | |
static void | ReleasePlugin (SCH_PLUGIN *aPlugin) |
Release a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory. More... | |
static const wxString | ShowType (SCH_FILE_T aFileType) |
Return a brief name for a plugin, given aFileType enum. More... | |
static SCH_FILE_T | EnumFromStr (const wxString &aFileType) |
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc. More... | |
static const wxString | GetFileExtension (SCH_FILE_T aFileType) |
Return the schematic file extension for aFileType. More... | |
static const wxString | GetLibraryFileExtension (SCH_FILE_T aFileType) |
Return the symbol library file extension (if any) for aFileType. More... | |
static SCH_FILE_T | GuessPluginTypeFromLibPath (const wxString &aLibPath) |
Return a plugin type given a symbol library using the file extension of aLibPath. More... | |
static SCH_FILE_T | GuessPluginTypeFromSchPath (const wxString &aSchematicPath) |
Return a plugin type given a schematic using the file extension of aSchematicPath. More... | |
A factory which returns an instance of a SCH_PLUGIN.
Definition at line 48 of file sch_io_mgr.h.
SCH_IO_MGR::DEFINE_ENUM_VECTOR | ( | SCH_FILE_T | , |
{ SCH_LEGACY, SCH_KICAD, SCH_ALTIUM, SCH_CADSTAR_ARCHIVE, SCH_EAGLE, SCH_DATABASE, SCH_LTSPICE, SCH_FILE_UNKNOWN } | |||
) |
A set of file types that the SCH_IO_MGR knows about, and for which there has been a plugin written.
Return a SCH_PLUGIN which the caller can use to import, export, save, or load design documents.
The returned SCH_PLUGIN, may be reference counted, so please call PluginRelease() when you are done using the returned SCH_PLUGIN. It may or may not be code running from a DLL/DSO.
aFileType | is from #SCH_FILE_T and tells which plugin to find. |
|
static |
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc.
Definition at line 105 of file sch_io_mgr.cpp.
Referenced by SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), SYMBOL_LIB_TABLE_RESCUER::OpenRescueLibrary(), SYMBOL_GRID_TRICKS::optionsEditor(), SYMBOL_LIB_TABLE_ROW::SetType(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
static |
Return the schematic file extension for aFileType.
aFileType | is the #SCH_FILE_T type. |
Definition at line 130 of file sch_io_mgr.cpp.
References SCH_PLUGIN::GetFileExtension(), and ReleasePlugin().
Referenced by SCH_EDIT_FRAME::OnImportProject().
|
static |
Return the symbol library file extension (if any) for aFileType.
aFileType | is the #SCH_FILE_T type. |
Definition at line 145 of file sch_io_mgr.cpp.
References SCH_PLUGIN::GetLibraryFileExtension(), and ReleasePlugin().
Referenced by GuessPluginTypeFromLibPath().
|
static |
Return a plugin type given a symbol library using the file extension of aLibPath.
Definition at line 160 of file sch_io_mgr.cpp.
References SCH_PLUGIN::CheckHeader(), ExpandEnvVarSubstitutions(), GetLibraryFileExtension(), and LegacySymbolLibFileExtension.
Referenced by SYMBOL_LIBRARY_MANAGER::addLibrary(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), SYMBOL_EDIT_FRAME::ExportSymbol(), SYMBOL_EDIT_FRAME::ImportSymbol(), SYMBOL_EDIT_FRAME::saveLibrary(), and SYMBOL_LIB_TABLE_GRID::SetValue().
|
static |
Return a plugin type given a schematic using the file extension of aSchematicPath.
Definition at line 204 of file sch_io_mgr.cpp.
References KiCadSchematicFileExtension, and LegacySchematicFileExtension.
Referenced by SCH_EDIT_FRAME::LoadSheetFromFile(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH_EDIT_FRAME::saveSchematicFile().
|
static |
Release a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory.
aPlugin | is the one to be released, and which is no longer usable after calling this. |
Definition at line 74 of file sch_io_mgr.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), GetFileExtension(), GetLibraryFileExtension(), SCH_PLUGIN::SCH_PLUGIN_RELEASER::release(), and KI_TEST::SCHEMATIC_TEST_FIXTURE::~SCHEMATIC_TEST_FIXTURE().
|
static |
Return a brief name for a plugin, given aFileType enum.
Definition at line 84 of file sch_io_mgr.cpp.
References _.
Referenced by SYMBOL_LIBRARY_MANAGER::addLibrary(), PANEL_SYM_LIB_TABLE::browseLibrariesHandler(), DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable(), SYMBOL_LIB_TABLE_ROW::GetType(), SYMBOL_EDIT_FRAME::IsSymbolFromLegacyLibrary(), PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), and SYMBOL_LIB_TABLE_GRID::SetValue().