← Back to team overview

kicad-developers team mailing list archive

Re: Pluggable IO modules

 

Hi Tomasz, thanks a lot for reading & comments.

2013/9/16 Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>

> On 09/16/2013 09:21 AM, Miguel Angel wrote:
>
>> _https://blueprints.launchpad.**net/kicad/+spec/pluggable-**file-io_<https://blueprints.launchpad.net/kicad/+spec/pluggable-file-io_>
>>
>> Hi Miguel,
>
> Looks good, I have two minor suggestions:
>
> 1. I wouldn't use any ID values that have to be pre-defined, there's a
> risk of conflict. IMHO it's simpler and more error proof to index plugins
> by names (something like pcbnew.io.eagle, etc.)
>
> Yes, that can be a good approach, let every file plugin provide its own
name, with a dotted namespace  (software).(type-of-plugin).(plugin name)




> 2. Register all plugins globally in some sort of PLUGIN_MANAGER class,
> that takes care of enumerating and allocating/freeing the DLLs and querying
> plugins with a given interface. The IO_MGR in pcbnew will only request PCB
> I/O plugins, some equivalent of it in eeschema will deal with schematics,
> etc.
>
>
So IO_MGR would request listings back to the PLUGIN_MANAGER, like:

List<PLUGIN*> PLUGIN_MANAGER.list("pcbnew.io")


I like this extra abstraction, then we can reuse the register/deregister
interface logic.

May be it makes sense to rename PLUGIN to FILE_PLUGIN  or something more
convenient, and keep generic PLUGIN methods over the "PLUGIN" class.

Cheers,
> Tom
>
>
>> Dick, I really appreciate your comments & ideas, as you are the IO_MGR &
>> PLUGIN classes author (high % at least)
>>
>>
>> Miguel Angel Ajo Pelayo
>> http://www.nbee.es
>> +34 636 52 25 69
>> skype: ajoajoajo
>>
>>
>> ______________________________**_________________
>> Mailing list: https://launchpad.net/~kicad-**developers<https://launchpad.net/~kicad-developers>
>> Post to     : kicad-developers@lists.**launchpad.net<kicad-developers@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~kicad-**developers<https://launchpad.net/~kicad-developers>
>> More help   : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>>
>>
>

References