[Dune-devel] Naming of single-inclusion macros

Oliver Sander sander at igpm.rwth-aachen.de
Tue Oct 1 10:30:06 CEST 2013


Dear Dune,
I would like to propose yet another change to our naming rules.  Don't be scared,
this one is simple.
On our rules page it states that the single-inclusion macro for a header file foo.hh
should be DUNE_FOO_HH.  However, I have already experienced name clashes here, because
some header names like solver.hh or grid.hh are likely to exist more than once.
I therefore propose to encode the entire path of each header in the macro.
For example, a file foo.hh in the the 'common' directory of dune-grid would have the macro
DUNE_GRID_COMMON_FOO_HH.  This would ensure unique macro names.  Any objections
to adding this to our list of rules?

*Note*: this is *not* a call to change all those macro names right now.  It should just
establish an ideal that is used when these macro names are touched anyway, or when new
headers are introduced.

Cheers,
Oliver

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20131001/9c9298c3/attachment.sig>


More information about the Dune-devel mailing list