← Back to team overview

kicad-developers team mailing list archive

Re: Patch: Extract LIB_PART read/write from SCH_LEGACY_PLUGIN_CACHE

 

Brian,

On 3/14/2019 10:54 AM, Brian wrote:
> Good morning, Wayne.
> 
> After sleeping on it, I think I can take another crack at this idea
> that'll fit better with the points you've raised.
> 
> A couple things to clear up, just for the sake of same-pageness:
> 
>> That being said, I still don't know exactly what
>> your are parsing and formatting.  Is it the full symbol library file
>> format definition or just LIB_PART definition?  If it's just LIB_PART
>> (which I suspect it is), then there is no need to break out all of the
>> symbol library file parser code.  Only loadPart(), savePart(), and its
>> dependencies need to be broken out.
> Correct.  Just the LIB_PART parts, not the whole schematic.  It is only
> the LIB_PART parse/format code that I had split out into the static
> classes, not the code related to reading schematics.

I thought so.  I take it your are storing a LIB_PART as string in each
row and that the database itself is acting like the library.

>> You could make them static in the SCH_LEGACY_PLUGIN_CACHE as well and
>> access them through the SCH_LEGACY_PLUGIN as static.
> Agreed.  After chewing on the ideas a while, I think this makes plenty
> of sense for a second revision of my idea.

Two things I forget to mention about your last patch.  Please use the
version test macros rather than a passing single passed to loadPart().
Pass the major and minor file versions and use the version macro to make
it clear that what your are testing.  Also, please don't put all of the
switch case statements on the same line.  It makes harder to read unless
you tidy them up by aligning them vertically.

Thanks,

Wayne

> 
> I'll have a new patch for review sometime soon.
> 
> Cheers,
> -Brian
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References