Incorrect boundary condition
[foam-extend-3.2.git] / bin / tools / doxyFilt-top.awk
blob3ed9cdfc5ec602cfa6ffd90c6d5dbf28c889d441
1 # -----------------------------------------------------------------------------
2 # ========= |
3 # \\ / F ield | foam-extend: Open Source CFD
4 # \\ / O peration |
5 # \\ / A nd | For copyright notice see file Copyright
6 # \\/ M anipulation |
7 #------------------------------------------------------------------------------
8 # License
9 # This file is part of foam-extend.
11 # foam-extend is free software: you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by the
13 # Free Software Foundation, either version 3 of the License, or (at your
14 # option) any later version.
16 # foam-extend is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 # Script
25 # doxyFilt-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 OpenFOAMIgnoreAppDoxygen"
81 # -----------------------------------------------------------------------------