← Back to team overview

kicad-developers team mailing list archive

Re: Patch: Legacy symbol read/write extraction; SCH_PLUGIN registry mechanism

 

Am 2019-03-11 17:46, schrieb Brian:
-- Registry mechanism

This one's a bit more involved and I welcome comment and discussion.

Refer to eeschema/sch_io_plugin_registry.h/cpp.

A new class called SCH_IO_PLUGIN_REGISTRY is a singleton which
maintains a few indices of plugins.  In order to register plugins,
each plugin class now exposes a static method called "create" which
returns the base type SCH_PLUGIN *.  A pointer to this static method
is provided to one of a few helper classes which lead to index entries
created for the file extension and a string name.

More comments later but a quick question:

Why make new plugin registry that is different from the plugin registry that is used in pcbnew? And if we do need a new version for schematic type plugins, can we unify them to avoid having to debug/maintain two different code bases that serve approximately the same purpose? For reference, I am referring to pcbnew/io_mgr.cpp

-S


Follow ups

References