Doxygen cleanups

* skip doxygen docs for local variables (treeBoundBox)
  * filter transforms 'Typedef' -> @typedef
  * added tools/find-retagged
  * manually changed some InClass tags to Typedef - still needs more attention
This commit is contained in:
Mark Olesen
2008-06-11 10:05:33 +02:00
parent 6d94d8ed8b
commit e5f0dd3e03
37 changed files with 190 additions and 172 deletions

View File

@ -8,40 +8,52 @@ s?^License.*?\*\/\
}
# remove entry
/^Primitive/{
/^Primitive *$/{
N
N
d
}
# remove entry
/^Implementation/{
/^Implementation *$/{
N
N
d
}
# remove entry
/^Application/{
/^Application *$/{
N
N
d
}
# remove entry
/^Type/{
/^Type *$/{
N
N
d
}
# remove entry
/^Global/{
/^Global *$/{
N
N
d
}
# Class
# Foam::className
# =>
# @class Foam::className
#
/^Class *$/,/^[^ ]/{
/^Class/d
s/^ /@class /
}
# Namespace
# namespaceName
# =>
@ -53,14 +65,14 @@ s/^ /@namespace /
}
# Class
# Foam::className
# Typedef
# Foam::def
# =>
# @class Foam::className
# @typedef Foam::def
#
/^Class *$/,/^[^ ]/{
/^Class/d
s/^ /@class /
/^Typedef *$/,/^[^ ]/{
/^Typedef/d
s/^ /@typedef /
}

View File

@ -1,57 +0,0 @@
body { color: #000000 ; background: #ffffff; margin: 0px; font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; font-size: 12px; }
a:link { text-decoration: none; color: #0000ff ; }
a:link:hover { text-decoration: none; color: #0000ff ; }
a:visited { text-decoration: none; color: #0000ff ; }
a:visited:hover { text-decoration: none; color: #0000ff ; }
a:link img { border: 0; }
a:visited img { border: 0; }
a:active img { border: 0; }
a.menuLefton { color: #0000ff; font-size: 12px; font-weight: bold; }
td.leftmenu { font-family: verdana, arial, helvetica, sans-serif; text-decoration: none; background: #ddddff; text-align: left; font-size: 14px; height: 20px; width: 200px; }
a.menuTopoff { color: #000000; font-size: 14px; }
a.menuTopoff:visited { color: #000000; font-size: 14px; }
a.menuTopoff:hover { color: #0000ff; font-size: 14px; }
td.topmenu { font-family: verdana, arial, helvetica, sans-serif; background: #ddddff; text-align: center; font-size: 16px; width: 150px; font-weight: bold; }
h1 { font-size: 18px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
/* formatting for member functions:
* Since the OpenFOAM code already has nice line-breaks, wrapping the lines
* just looks terrible.
* Give a slightly different background to make it easier to find.
*/
.memitem {
padding: 4px;
background-color: #eef3f5;
border-width: 1px;
border-style: solid;
border-color: #dedeee;
}
.memproto {
background-color: #d5e1e8;
width: 100%;
border-width: 1px;
border-style: solid;
border-color: #84b0c7;
font-weight: bold;
}
table.memname {
width: 100%;
background: #f7f7ff;
white-space: nowrap;
}
.mdescLeft {
margin: 0px;
}
.mdescRight {
font-style: italic;
}
.paramkey {
width: 5%;
}

View File

@ -5,6 +5,7 @@ See the comments in the scripts.
2. fix-Class
3. find-tinyDescription
4. find-placeholderDescription
5. find-retagged
Misc Tools
1. find-templateInComments

View File

@ -39,7 +39,6 @@ sub wanted {
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';

View File

@ -8,7 +8,7 @@ use File::Find ();
# find-placeholderDescription
#
# Description
# Search for *.[H] files with a Description that looks like it is
# Search for *.[H] files with a Description that looks like it is
# a placeholder
# eg, Foam::className
#
@ -30,21 +30,21 @@ sub wanted {
return;
}
my ( $currentClass, $description );
my ( $tag, $description );
local @ARGV = $_;
while (<>) {
my $name;
## examine the class name
if (/^Class\s*$/) {
## examine the class/typedef name
if (/^(Class|Typedef)\s*$/) {
$_ = <>;
($currentClass) = split;
($tag) = split;
}
if (/^Description\s*$/) {
$_ = <>;
( $description = $_ ) =~ s{^\s+|\s+$}{}g;
# remove trailing punctuation as being noise
$description =~ s{\s*[.,:]+$}{};
last;
@ -53,13 +53,13 @@ sub wanted {
$description ||= '';
## we have 'Class' tag
if ( defined $currentClass ) {
## we have 'Class/Typedef' tag
if ( defined $tag ) {
# description looks like a class name
if (
$description =~ m{^\w+(::\w+)+$}
) {
print "$File::Find::name # $description\n";
) {
print "$File::Find::name # $description\n";
}
}
}

48
doc/Doxygen/tools/find-retagged Executable file
View File

@ -0,0 +1,48 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-retagged
#
# Description
# Search for *.[H] files with 'InClass', 'InNamespace' or 'Type'
# starting in the first column.
# In some places these could removed. In other places they should be
# replaced with a 'Typedef'
# - print filename and the tag (InClass|InNamespace|Type)
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[H]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (/^(InClass|InNamespace|Type)\s*$/) {
print "$File::Find::name $1 line=$.\n";
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

View File

@ -28,7 +28,7 @@ Class
Description
A HashTable with word keys but without contents.
Class
Typedef
Foam::wordHashSet
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Typedef
Foam::labelHashSet
Description

View File

@ -26,14 +26,14 @@ Class
Foam::IOstream
Description
An IOstream is an abstract base class for all input/output
systems; be they streams, files, token lists etc.
The basic operations are construct, close, read token,
read primitive and read binary block. In addition version control
and line number counting is incorporated. Usually one would use
the read primitive member functions, but if one were reading a
stream on unknown data sequence one can read token by token, and
then analyse.
An IOstream is an abstract base class for all input/output systems; be
they streams, files, token lists etc.
The basic operations are construct, close, read token, read primitive
and read binary block. In addition version control and line number
counting is incorporated. Usually one would use the read primitive
member functions, but if one were reading a stream on unknown data
sequence one can read token by token, and then analyse.
SourceFiles
IOprint.C

View File

@ -154,7 +154,7 @@ public:
//- Flush stream
virtual void flush() = 0;
//- Add '\n' and flush stream
//- Add newline and flush stream
virtual void endl() = 0;
//- Get width of output field
@ -233,7 +233,7 @@ inline Ostream& flush(Ostream& os)
}
//- Add '\n' and flush stream
//- Add newline and flush stream
inline Ostream& endl(Ostream& os)
{
os.endl();

View File

@ -22,11 +22,17 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::complexFields
Typedef
Foam::complexField
Description
Specialisation of Field\<T\> for complex and complexVector.
Specialisation of Field\<T\> for complex.
Typedef
Foam::complexVectorField
Description
Specialisation of Field\<T\> for complexVector.
SourceFiles
complexFields.C

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::diagTensorField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::labelField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::scalarField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::sphericalTensorField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::symmTensorField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::symmTransformField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::tensorField
Description

View File

@ -22,11 +22,8 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::vector2DField
Description
Specialisation of Field\<T\> for vector2D.
Foam::vector2DField
SourceFiles
vector2DField.C

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::vector2DField
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::vectorField
Description

View File

@ -22,10 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::primitivePatchInterpolation
Description
Foam::primitivePatchInterpolation
\*---------------------------------------------------------------------------*/

View File

@ -22,11 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::edgeIOList
Description
IOList of edges
An IOList of edges
\*---------------------------------------------------------------------------*/

View File

@ -22,11 +22,6 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::ZoneID
Description
\*---------------------------------------------------------------------------*/
#ifndef ZoneIDs_H
@ -41,8 +36,11 @@ Description
namespace Foam
{
//- Foam::pointZoneID
typedef ZoneID<pointZone> pointZoneID;
//- Foam::faceZoneID
typedef ZoneID<faceZone> faceZoneID;
//- Foam::cellZoneID
typedef ZoneID<cellZone> cellZoneID;
}

View File

@ -22,10 +22,8 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::cellZoneMesh
Description
Foam::cellZoneMesh
\*---------------------------------------------------------------------------*/

View File

@ -22,10 +22,8 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::faceZoneMesh
Description
Foam::faceZoneMesh
\*---------------------------------------------------------------------------*/

View File

@ -22,10 +22,8 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::pointZoneMesh
Description
Foam::pointZoneMesh
\*---------------------------------------------------------------------------*/

View File

@ -22,10 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::indirectPrimitivePatch
Description
Foam::indirectPrimitivePatch
\*---------------------------------------------------------------------------*/

View File

@ -22,10 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::primitiveFacePatch
Description
Foam::primitiveFacePatch
\*---------------------------------------------------------------------------*/

View File

@ -22,10 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::primitivePatch
Description
Foam::primitivePatch
\*---------------------------------------------------------------------------*/

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::doubleScalar
Description

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::floatScalar
Description

View File

@ -26,9 +26,12 @@ InClass
Foam::contiguous
Description
Template fuction which specifies if the data of the type is contiguous
or not. The default function specifies not and this is specialised for
the types (e.g. primitives) for which their data is contiguous.
Template function which specifies if the data of the type is contiguous
or not.
The default function specifies that data are not contiguous.
This is specialised for the types (e.g. primitives) for which their
data are contiguous.
\*---------------------------------------------------------------------------*/

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Typedef
Foam::bMesh
Description

View File

@ -22,10 +22,11 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::sprayThermoTypes
Typedef
Foam::specieProperties
Description
Foam::specieProperties
\*---------------------------------------------------------------------------*/
@ -44,7 +45,7 @@ namespace Foam
typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > >
specieProperties;
//typedef sutherlandTransport<specieThermo<hConstThermo<perfectGas> > >
// typedef sutherlandTransport<specieThermo<hConstThermo<perfectGas> > >
// specieProperties;
}

View File

@ -22,10 +22,17 @@ License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
InClass
Foam::IntegrationScheme
Typedef
Foam::scalarIntegrationScheme
Description
Foam::scalarIntegrationScheme
Typedef
Foam::vectorIntegrationScheme;
Description
Foam::vectorIntegrationScheme;
SourceFiles
IntegrationScheme.C

View File

@ -29,19 +29,17 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const treeBoundBox treeBoundBox::greatBox
const Foam::treeBoundBox Foam::treeBoundBox::greatBox
(
vector(-GREAT, -GREAT, -GREAT),
vector(GREAT, GREAT, GREAT)
);
const label facesArray[6][4] =
//! @cond - skip documentation : local scope only
const Foam::label facesArray[6][4] =
{
{0, 4, 6, 2}, // left
{1, 3, 7, 5}, // right
@ -50,25 +48,33 @@ const label facesArray[6][4] =
{0, 2, 3, 1}, // back
{4, 5, 7, 6} // front
};
const faceList treeBoundBox::faces(initListList<face, label, 6, 4>(facesArray));
//! @endcond
const Foam::faceList Foam::treeBoundBox::faces
(
initListList<face, label, 6, 4>(facesArray)
);
const label edgesArray[12][2] =
//! @cond - skip documentation : local scope only
const Foam::label edgesArray[12][2] =
{
{0, 1}, //0
{0, 1}, // 0
{1, 3},
{2, 3}, //2
{2, 3}, // 2
{0, 2},
{4, 5}, //4
{4, 5}, // 4
{5, 7},
{6, 7}, //6
{6, 7}, // 6
{4, 6},
{0, 4}, //8
{0, 4}, // 8
{1, 5},
{3, 7}, //10
{3, 7}, // 10
{2, 6}
};
const edgeList treeBoundBox::edges
//! @endcond
const Foam::edgeList Foam::treeBoundBox::edges
(
initListList<edge, label, 12, 2>(edgesArray)
);
@ -77,7 +83,7 @@ const edgeList treeBoundBox::edges
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct as the bounding box of the given pointField
treeBoundBox::treeBoundBox(const UList<point>& points)
Foam::treeBoundBox::treeBoundBox(const UList<point>& points)
:
boundBox()
{
@ -102,7 +108,7 @@ treeBoundBox::treeBoundBox(const UList<point>& points)
// Construct as the bounding box of the given pointField
treeBoundBox::treeBoundBox
Foam::treeBoundBox::treeBoundBox
(
const UList<point>& points,
const labelList& meshPoints
@ -133,7 +139,7 @@ treeBoundBox::treeBoundBox
// Construct from Istream
treeBoundBox::treeBoundBox(Istream& is)
Foam::treeBoundBox::treeBoundBox(Istream& is)
:
boundBox(is)
{}
@ -141,7 +147,7 @@ treeBoundBox::treeBoundBox(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
pointField treeBoundBox::points() const
Foam::pointField Foam::treeBoundBox::points() const
{
pointField points(8);
forAll(points, octant)
@ -153,7 +159,7 @@ pointField treeBoundBox::points() const
}
treeBoundBox treeBoundBox::subBbox(const direction octant) const
Foam::treeBoundBox Foam::treeBoundBox::subBbox(const direction octant) const
{
if (octant > 7)
{
@ -216,8 +222,11 @@ treeBoundBox treeBoundBox::subBbox(const direction octant) const
// Octant to bounding box using permutation only.
treeBoundBox treeBoundBox::subBbox(const point& mid, const direction octant)
const
Foam::treeBoundBox Foam::treeBoundBox::subBbox
(
const point& mid,
const direction octant
) const
{
if (octant > 7)
{
@ -285,7 +294,7 @@ treeBoundBox treeBoundBox::subBbox(const point& mid, const direction octant)
// - sets coordinate to exact position: e.g. pt.x() = min().x()
// since plane intersect routine might have truncation error.
// This makes sure that posBits tests 'inside'
bool treeBoundBox::intersects
bool Foam::treeBoundBox::intersects
(
const point& start,
const point& end,
@ -387,13 +396,13 @@ bool treeBoundBox::intersects
// this.bb fully contains bb
bool treeBoundBox::contains(const treeBoundBox& bb) const
bool Foam::treeBoundBox::contains(const treeBoundBox& bb) const
{
return contains(bb.min()) && contains(bb.max());
}
bool treeBoundBox::containsNarrow(const point& sample) const
bool Foam::treeBoundBox::containsNarrow(const point& sample) const
{
return
(
@ -406,7 +415,7 @@ bool treeBoundBox::containsNarrow(const point& sample) const
);
}
bool treeBoundBox::contains(const vector& dir, const point& sample) const
bool Foam::treeBoundBox::contains(const vector& dir, const point& sample) const
{
//
// Compare all components against min and max of bb
@ -447,7 +456,7 @@ bool treeBoundBox::contains(const vector& dir, const point& sample) const
// Code position of point relative to box
direction treeBoundBox::posBits(const point& pt) const
Foam::direction Foam::treeBoundBox::posBits(const point& pt) const
{
direction posBits = 0;
@ -483,7 +492,7 @@ direction treeBoundBox::posBits(const point& pt) const
// nearest and furthest corner coordinate.
// !names of treeBoundBox::min() and treeBoundBox::max() are confusing!
void treeBoundBox::calcExtremities
void Foam::treeBoundBox::calcExtremities
(
const point& sample,
point& nearest,
@ -531,7 +540,7 @@ void treeBoundBox::calcExtremities
}
scalar treeBoundBox::maxDist(const point& sample) const
Foam::scalar Foam::treeBoundBox::maxDist(const point& sample) const
{
point near, far;
calcExtremities(sample, near, far);
@ -543,7 +552,7 @@ scalar treeBoundBox::maxDist(const point& sample) const
// Distance comparator
// Compare all vertices of bounding box against all of other bounding
// box to see if all vertices of one are nearer
label treeBoundBox::distanceCmp
Foam::label Foam::treeBoundBox::distanceCmp
(
const point& sample,
const treeBoundBox& other
@ -622,15 +631,11 @@ bool operator!=(const treeBoundBox& a, const treeBoundBox& b)
// * * * * * * * * * * * * * * * IOstream Operator * * * * * * * * * * * * * //
Istream& operator>>(Istream& is, treeBoundBox& bb)
Foam::Istream& Foam::operator>>(Istream& is, treeBoundBox& bb)
{
is >> bb.min() >> bb.max();
return is;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //