← Back to team overview

kicad-developers team mailing list archive

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


Hey Seth,

On 3/11/2019 6:12 PM, Seth Hillbrand wrote:
> 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

I don't think this is possible until all of the source files that are
compiled multiple times on a per "application" basis are factored out.
The units are the primary issue but there may be other lurking in there
as well.  Any unified I/O manager will have to be able to manage board
and schematic units in a common shared library.


Follow ups