[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header fillename convention.

Adrian Ratnapala wrote:

>Our coding style guide leaves it open as to whether to put the
>subproject prefix onto the names of headers.  We shoul make a
>decision one way or another.
>PRO prefix:  There is still a possibility of namespace clashes without 
>             them.
>CON:         Thanks to the include/PenguinPlay directory the risk of
>             such clashes is small, and they are entirely internal
>             to PPlay development.

Depends ;)

If a header primarily describes one class it should have that class' name
(like ppgGC.h). *With* prefix.
For main Subproject headers (Penguin2d.h, PenguinFile.h, ...) adding a
prefix would be silly.
And for all the other headers I'd say forget the prefix. Those cases are
uncommon enough anyway.

For internal headers (the ones that will not appear in the installed
include dir) I use prefix+underscore, e.g. ppf_PakFile.h
But here clashes are unlikely too because those headers are only visible to
that single subproject.


Winsock: what Bill Gates wears under his Winshoe