I want to reorganize my C++ code project, which contains of hundreds of source files.
I want to split everything into 4 libraries, taking care to avoid cyclic dependencies:
(a) src/core
(b) src/util
(c) src/create
(d) src/process
Basically, core
implements the basic data structures and util
implements some basic utility functions to work with them.
create
uses (a) and (b) to create such data structures from data, which is a kind of complicated procedure, and process
takes such such data structures and processes them, implementing the main functionality of the package.
Is that reasonable?
I also have some additional code: There are some functions that glue other stuff together, e.g. they create the data structures from data in a particular way and then process them. Also, there are different user programs containing main
.
I'm thinking of putting them into different directories:
src/glue - for the glue code that uses the `create` and `process` libraries
src/driver - for the code with main() functions
Is that overkill? Any suggestions?
I notice it's not an essential programming question, but I'd like some advice before I reorganize everything and publish the code.
Thanks!