[Dune-devel] Naming of single-inclusion macros
Markus Blatt
markus at dr-blatt.de
Tue Oct 1 11:58:01 CEST 2013
Hi,
On Tue, Oct 01, 2013 at 10:30:06AM +0200, Oliver Sander wrote:
> 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?
The entire path seems overkill to me! As each module can only exist
once it suffices to include at least the module name into
the pragma name. Of course people are allowed to incorporate even more
(such as the complete path), but this should be up to the module
developer. So for a dune-common/dune/common/parallel/foo.hh
header the following is both valid:
DUNE_COMMON_FOO_HH
DUNE_COMMON_PARALLEL_FOO_HH
Markus
--
Do you need more support with DUNE or HPC in general?
Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858 Fax: +49 (0)322 1108991658
More information about the Dune-devel
mailing list