[geos-devel] Namespaces and headers split

Mateusz Łoskot mateusz at loskot.net
Thu Mar 23 20:13:27 EST 2006


strk at refractions.net wrote:
> I've completed the namespaces and headers split step.

Great work!

> GEOS namespaces now reflect JTS packages, and all classes are named 
> after JTS classes/interfaces. There are now duplicated names, but in 
> different namespaces (as it is for JTS).

Are behind those duplicated names also duplicated types?

If you don't mind, I'd have one more suggestion.
Currently, the source tree is quite complex and the main trunk with
implementation files (.cpp) includes its mirror in form of headers subdirs.
Here is short example presenting how does it look like now:

/geos/capi
/geos/source/operation/buffer
/geos/source/headers/geos
/geos/source/headers/geos/operation/buffer

So, as you can see, headers directory has the same structure
(operation/buffer) but the only difference is that it contains headers
(.h) files.
Shortly, GEOS follows the concept clear separation of headers and
implementation files, just like common GNU project structure, that includes:

/project-name/src
/project-name/include

Now, my suggestion is to make GEOS' structure more clear by arranging it
in real GNU style.

Here is new version of the example above:

/geos/src/capi
/geos/src/operation/buffer
/geos/include/capi
/geos/include/operation/buffer


In my opinion, the this could make the structure better readable and
clear. As wall as less deep, so it's would make if easier to navigate
through it.
Note, that there would not be much problem with header files inclusion, 
because GEOS' implementation files use include path based on -I compiler 
definition.


What do you think about my suggestion?

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the geos-devel mailing list