Difference between revisions of "Cpp Coding Standards/HEADERS"
From Apache OpenOffice Wiki
m (Cpp Coding Standards/Header Files moved to Cpp Coding Standards/HEADERS: consistency) |
(exported details into own pages, formatting) |
||
Line 1: | Line 1: | ||
− | + | === Header Files (HEADERS) - Summary === | |
+ | ''What to do or do not with header files.'' | ||
− | + | ===== Self Sufficient and Minimal <span id="Self">(Self)</span> ===== | |
− | + | Header files should be self sufficient and minimal. [[/Self|-> Details]] | |
− | === | + | |
− | ==== | + | ===== Include Directly <span id="IncDirect">(IncDirect)</span> ===== |
+ | Include the header files for all types you need directly, not via another file. [[/IncDirect|-> Details]] | ||
− | + | ===== Precompiled headers <span id="IncPCH">(IncPCH)</span> ===== | |
− | + | The first statement in each cxx file has to be the inclusion of the precompiled header of the module. [[/IncPCH|-> Details]] | |
− | + | ||
− | + | ||
− | + | ===== Internal Include Guards <span id="IncGuards">(IncGuards)</span> ===== | |
− | + | Use internal include guards, but don't use the external ones. [[/IncGuards|-> Details]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | ==== Internal Include Guards <span id="IncGuards">(IncGuards)</span> ==== | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
---- | ---- | ||
[[Category:Coding Standards]] | [[Category:Coding Standards]] |
Revision as of 16:41, 22 May 2007
Contents
Header Files (HEADERS) - Summary
What to do or do not with header files.
Self Sufficient and Minimal (Self)
Header files should be self sufficient and minimal. -> Details
Include Directly (IncDirect)
Include the header files for all types you need directly, not via another file. -> Details
Precompiled headers (IncPCH)
The first statement in each cxx file has to be the inclusion of the precompiled header of the module. -> Details
Internal Include Guards (IncGuards)
Use internal include guards, but don't use the external ones. -> Details