25#include <wx/filename.h>
48#define FMT_UNIMPLEMENTED _( "Plugin \"%s\" does not implement the \"%s\" function." )
49#define FMT_NOTFOUND _( "Plugin type \"%s\" is not found." )
87 for(
const auto& plugin : plugins )
89 if ( plugin.m_type == aType )
95 return wxString::Format(
_(
"UNKNOWN (%d)" ), aType );
103 for(
const auto& plugin : plugins )
105 if ( plugin.m_name == aType )
107 return plugin.m_type;
121 for(
const auto& plugin : plugins )
134 return plugin.m_type;
145 for(
const auto& plugin : plugins )
158 return plugin.m_type;
174 return pi->
LoadBoard( aFileName, aAppendToMe, aProperties, aProject, aProgressReporter );
189 pi->
SaveBoard( aFileName, aBoard, aProperties );
214 wxT(
"Altium Circuit Maker" ),
219 wxT(
"Altium Circuit Studio" ),
224 wxT(
"Altium Designer" ),
229 wxT(
"CADSTAR PCB Archive" ),
239 wxT(
"EasyEDA / JLCEDA Std" ),
244 wxT(
"EasyEDA / JLCEDA Pro" ),
264 wxT(
"Solidworks PCB" ),
Pcbnew PLUGIN for CADSTAR PCB Archive (*.cpa) format: an ASCII format based on S-expressions.
Information pertinent to a Pcbnew printed circuit board.
Works with Eagle 6.x XML board files and footprints to implement the Pcbnew PLUGIN API or a portion o...
A PLUGIN derivation for saving and loading Geda PCB files.
PLUGIN * Create(PCB_FILE_T aFileType) const
const std::vector< ENTRY > & AllPlugins() const
static PLUGIN_REGISTRY * Instance()
static const wxString ShowType(PCB_FILE_T aFileType)
Return a brief name for a plugin given aFileType enum.
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
static void PluginRelease(PLUGIN *aPlugin)
Release a PLUGIN back to the system and may cause it to be unloaded from memory.
PCB_FILE_T
The set of file types that the IO_MGR knows about, and for which there has been a plugin written,...
@ LEGACY
Legacy Pcbnew file formats prior to s-expression.
@ KICAD_SEXP
S-expression Pcbnew file format.
@ GEDA_PCB
Geda PCB file formats.
static PCB_FILE_T EnumFromStr(const wxString &aFileType)
Return the PCB_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc.
static PCB_FILE_T FindPluginTypeFromBoardPath(const wxString &aFileName, int aCtl=0)
Return a plugin type given a path for a board file.
static BOARD * Load(PCB_FILE_T aFileType, const wxString &aFileName, BOARD *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Find the requested PLUGIN and if found, calls the PLUGIN::LoadBoard() function on it using the argume...
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Return a PLUGIN which the caller can use to import, export, save, or load design documents.
static void Save(PCB_FILE_T aFileType, const wxString &aFileName, BOARD *aBoard, const STRING_UTF8_MAP *aProperties=nullptr)
Write either a full aBoard to a storage file in a format that this implementation knows about,...
A PLUGIN derivation which could possibly be put into a DLL/DSO.
A PLUGIN derivation for saving and loading Pcbnew s-expression formatted files.
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
A base class that BOARD loading and saving plugins should derive from.
virtual bool CanReadFootprintLib(const wxString &aFileName) const
Checks if this PLUGIN can read footprint library from specified file or directory.
virtual void SaveBoard(const wxString &aFileName, BOARD *aBoard, const STRING_UTF8_MAP *aProperties=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Write aBoard to a storage file in a format that this PLUGIN implementation knows about or it can be u...
virtual bool CanReadBoard(const wxString &aFileName) const
Checks if this PLUGIN can read the specified board file.
virtual BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Load information from some input file format that this PLUGIN implementation knows about into either ...
A progress reporter interface for use in multi-threaded environments.
Container for project specific data.
A name/value tuple with unique names and optional values.
Pcbnew PLUGIN for Fabmaster (Allegro) ASCII format.
static IO_MGR::REGISTER_PLUGIN registerAltiumCircuitMakerPlugin(IO_MGR::ALTIUM_CIRCUIT_MAKER, wxT("Altium Circuit Maker"), []() -> PLUGIN *{ return new ALTIUM_CIRCUIT_MAKER_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerEasyEDAPlugin(IO_MGR::EASYEDA, wxT("EasyEDA / JLCEDA Std"), []() -> PLUGIN *{ return new EASYEDA_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerCadstarArchivePlugin(IO_MGR::CADSTAR_PCB_ARCHIVE, wxT("CADSTAR PCB Archive"), []() -> PLUGIN *{ return new CADSTAR_PCB_ARCHIVE_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerEaglePlugin(IO_MGR::EAGLE, wxT("Eagle"), []() -> PLUGIN *{ return new EAGLE_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerAltiumDesignerPlugin(IO_MGR::ALTIUM_DESIGNER, wxT("Altium Designer"), []() -> PLUGIN *{ return new ALTIUM_DESIGNER_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerFabmasterPlugin(IO_MGR::FABMASTER, wxT("Fabmaster"), []() -> PLUGIN *{ return new FABMASTER_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerIPC2581Plugin(IO_MGR::IPC2581, wxT("IPC-2581"), []() -> PLUGIN *{ return new IPC2581_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerGPCBPlugin(IO_MGR::GEDA_PCB, wxT("GEDA/Pcb"), []() -> PLUGIN *{ return new GPCB_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerPcadPlugin(IO_MGR::PCAD, wxT("P-Cad"), []() -> PLUGIN *{ return new PCAD_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerKicadPlugin(IO_MGR::KICAD_SEXP, wxT("KiCad"), []() -> PLUGIN *{ return new PCB_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerEasyEDAProPlugin(IO_MGR::EASYEDAPRO, wxT("EasyEDA / JLCEDA Pro"), []() -> PLUGIN *{ return new EASYEDAPRO_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerLegacyPlugin(IO_MGR::LEGACY, wxT("Legacy"), []() -> PLUGIN *{ return new LEGACY_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerSolidworksPCBPlugin(IO_MGR::SOLIDWORKS_PCB, wxT("Solidworks PCB"), []() -> PLUGIN *{ return new SOLIDWORKS_PCB_PLUGIN;})
static IO_MGR::REGISTER_PLUGIN registerAltiumCircuitStudioPlugin(IO_MGR::ALTIUM_CIRCUIT_STUDIO, wxT("Altium Circuit Studio"), []() -> PLUGIN *{ return new ALTIUM_CIRCUIT_STUDIO_PLUGIN;})
#define THROW_IO_ERROR(msg)
#define KICTL_KICAD_ONLY
chosen file is from KiCad according to user
#define KICTL_NONKICAD_ONLY
chosen file is non-KiCad according to user
Pcbnew PLUGIN for P-Cad 200x ASCII *.pcb format.
Definition of file extensions used in Kicad.