ENH: RASModel.C: clipping input to log
[OpenFOAM-1.7.x.git] / bin / tools / doxyFilter-top.awk
blob8e9a8c56888bb79aa0500936580a2663768327c5
1 # -----------------------------------------------------------------------------
2 # ========= |
3 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 # \\ / O peration |
5 # \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
6 # \\/ M anipulation |
7 #------------------------------------------------------------------------------
8 # License
9 # This file is part of OpenFOAM.
11 # OpenFOAM is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 # for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 # Script
25 # doxyFilter-top.awk
27 # Description
28 # Only output the first /* ... */ comment section found in the file
29 # Use @cond / @endcond to suppress documenting all classes/variables
30 # - This is useful for application files in which only the first
31 # block documents the application itself.
33 # -----------------------------------------------------------------------------
34 BEGIN {
35 state = 0
38 # a '/*' at the beginning of a line starts a comment block
39 /^ *\/\*/ {
40 state++
43 # check first line
44 # either started with a comment or skip documentation for the whole file
45 FNR == 1 {
46 if (!state)
48 print "//! @cond OpenFOAMIgnoreAppDoxygen"
49 state = 2
53 # a '*/' ends the comment block
54 # skip documentation for rest of the file
55 /\*\// {
56 if (state == 1)
58 print
59 print "//! @cond OpenFOAMIgnoreAppDoxygen"
61 state = 2
62 next
65 # print everything within the first comment block
67 if (state)
69 print
71 next
74 END {
75 if (state == 2)
77 print "//! @endcond"
81 # -----------------------------------------------------------------------------