← Back to team overview

kicad-developers team mailing list archive

Re: Renaming headers?

 

On 09/01/18 16:21, Kristoffer Ödmark wrote:
> Oh I was not planning on doing this, I am way to new to do a good job of
> sorting the codebase. Just wanted to see if there have been anyone else
> thinking in these lines. Currently in the pcbnew folder, the files seems
> to be grouped by their names, which is also fine. I would just enjoy if
> the files where grouped into folders more. there are currently 200+
> files in the pcbnew root directory.
> 
> For example:
>     9 files starting with specctra
>     47 files starting with class
>     29 files starting with pcb
> 

Hey,

I would vote for moving the files into folders grouped by functionality.
For example:
- board/ - board model (class_board, track, via, etc) + core algorithms
(zone filling, connectivity, ratsnest)
- io/ - all I/O plugins and exporters (in separate subdirectories) +
plugin management code
- io/kicad - kicad plugin
- io/legacy - legacy plgugin
- io/exporters/specctra - specctra export code
- io/importers/eagle - eagle import code
- view/ - GAL display code
- tools/ - all GAL tools
- legacy/ - all legacy tools/canvas code
- ui/ - wx-specific user interface stuff (dialogs, frames, etc.).

If we go for separate subfolders, I'd also suggest removing the class_
prefixes from the file names. All of the new code is OOP, so each source
file contains a class (or more).

In the long term, we could also eliminate linking dependencies between
these folders (so that class BOARD has no dependency on the GUI, etc).

Cheers,
Tom


Follow ups

References