Boost logo

Geometry :

Subject: [ggl] Header inclusion guards
From: Mateusz Loskot (mateusz)
Date: 2009-04-18 11:41:03


Barend Gehrels wrote:
>>> Then, after GGL will be merged with Boost, it will be simple to
>>> update include paths by search "<ggl" and replace with
>>> "<boost/ggl"
>>>
>>> Is that OK? Are we ready to plan such update?
>
> One thing more about this: the namespace. Should it be changed as
> well?

I'd stick to Boost best practice and rename to ggl.
Perhaps there may be another library in the Boost collection
that includes (sub)namespace called geometry then name might be
ambiguous to users.

By the way, Boost Header Policy at
http://www.boost.org/development/header.html says:

The sample header uses the Boost convention of all uppercase letters,
with the header name prefixed by the namespace name, and suffixed with
HPP, separated by underscores.

> I think we can leave it just "geometry::", it is not necessary to say
> "ggl::", meaning "generic geometry library::", in each phrase. On
> the other hand: it is mpl:: and gil::. The BGL (boost graph library)
> does not live in a namespace and is in the folder "boost/graph".

The name of the library id Graph Library, however after it was submitted
to Boost, it got prefixed with Boost what makes Boost Graph Library.
This naming is mirrored in namespaces layout:

Boost -> boost::

Boost Graph -> boost::graph

Graph is a single word name. GGL, as GIL, is multi-word name.
So, GIL variant seems to fit GGL best and it could be defined as:

- incl. guards
GGL_<FILE>_HPP
GGL_<DIR>_<FILE>_HPP

- namespaces

boost::ggl
boost::ggl::algorithms
boost::ggl::geometries
...

- directories

<boost_root>/boost/ggl
<boost_root>/libs/ggl
<boost_root>/libs/ggl/doc
<boost_root>/libs/ggl/example
<boost_root>/libs/ggl/test

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org

Geometry list run by mateusz at loskot.net