23#include <wx/filename.h>
43#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
44#define FMT_NOTFOUND _( "Plugin type \"%s\" is not found." )
60SCH_PLUGIN* SCH_IO_MGR::FindPlugin( SCH_FILE_T aFileType )
77 default:
return nullptr;
100 case SCH_KICAD:
return wxString( wxT(
"KiCad" ) );
101 case SCH_LEGACY:
return wxString( wxT(
"Legacy" ) );
102 case SCH_ALTIUM:
return wxString( wxT(
"Altium" ) );
103 case SCH_CADSTAR_ARCHIVE:
return wxString( wxT(
"CADSTAR Schematic Archive" ) );
104 case SCH_DATABASE:
return wxString( wxT(
"Database" ) );
105 case SCH_EAGLE:
return wxString( wxT(
"EAGLE" ) );
106 case SCH_EASYEDA:
return wxString( wxT(
"EasyEDA (JLCEDA) Std" ) );
107 case SCH_EASYEDAPRO:
return wxString( wxT(
"EasyEDA (JLCEDA) Pro" ) );
108 case SCH_LTSPICE:
return wxString( wxT(
"LTspice" ) );
109 case SCH_HTTP:
return wxString( wxT(
"HTTP" ) );
110 default:
return wxString::Format(
_(
"Unknown SCH_FILE_T value: %d" ),
122 if( aType == wxT(
"KiCad" ) )
124 else if( aType == wxT(
"Legacy" ) )
126 else if( aType == wxT(
"Altium" ) )
128 else if( aType == wxT(
"CADSTAR Schematic Archive" ) )
129 return SCH_CADSTAR_ARCHIVE;
130 else if( aType == wxT(
"Database" ) )
132 else if( aType == wxT(
"EAGLE" ) )
134 else if( aType == wxT(
"EasyEDA (JLCEDA) Std" ) )
136 else if( aType == wxT(
"EasyEDA (JLCEDA) Pro" ) )
137 return SCH_EASYEDAPRO;
138 else if( aType == wxT(
"LTspice" ) )
140 else if( aType == wxT(
"HTTP" ) )
145 return SCH_FILE_UNKNOWN;
151 for(
const SCH_IO_MGR::SCH_FILE_T&
fileType : SCH_IO_MGR::SCH_FILE_T_vector )
153 bool isKiCad =
fileType == SCH_IO_MGR::SCH_KICAD ||
fileType == SCH_IO_MGR::SCH_LEGACY;
170 return SCH_IO_MGR::SCH_FILE_UNKNOWN;
177 for(
const SCH_IO_MGR::SCH_FILE_T&
fileType : SCH_IO_MGR::SCH_FILE_T_vector )
179 bool isKiCad =
fileType == SCH_IO_MGR::SCH_KICAD ||
fileType == SCH_IO_MGR::SCH_LEGACY;
196 return SCH_IO_MGR::SCH_FILE_UNKNOWN;
A KiCad database library provides both symbol and footprint metadata, so there are "shim" plugins on ...
A SCH_PLUGIN derivation for loading 6.x+ Eagle schematic files.
A KiCad HTTP library provides both symbol and footprint metadata, so there are "shim" plugins on both...
static SCH_FILE_T EnumFromStr(const wxString &aFileType)
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy",...
static const wxString ShowType(SCH_FILE_T aFileType)
Return a brief name for a plugin, given aFileType enum.
static SCH_FILE_T GuessPluginTypeFromSchPath(const wxString &aSchematicPath, int aCtl=0)
Return a plugin type given a schematic using the file extension of aSchematicPath.
static void ReleasePlugin(SCH_PLUGIN *aPlugin)
Release a SCH_PLUGIN back to the system, and may cause it to be unloaded from memory.
static SCH_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a symbol library using the file extension of aLibPath.
A SCH_PLUGIN derivation for loading schematic files created before the new s-expression file format.
Helper object to release a SCH_PLUGIN in the context of a potential thrown exception through its dest...
Base class that schematic file and library loading and saving plugins should derive from.
virtual bool CanReadSchematicFile(const wxString &aFileName) const
Checks if this SCH_PLUGIN can read the specified schematic file.
virtual bool CanReadLibrary(const wxString &aFileName) const
Checks if this SCH_PLUGIN can read the specified symbol library file.
A SCH_PLUGIN derivation for loading schematic files using the new s-expression file format.
#define KICTL_KICAD_ONLY
chosen file is from KiCad according to user
#define KICTL_NONKICAD_ONLY
chosen file is non-KiCad according to user
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)
Definition of file extensions used in Kicad.