mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated foamHelp utility
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -176,38 +176,32 @@ Foam::doxygenXmlParser::doxygenXmlParser
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
|
||||
void Foam::doxygenXmlParser::skipBlock
|
||||
(
|
||||
IFstream& is,
|
||||
const word& blockName
|
||||
) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across </blockName>
|
||||
|
||||
string closeName = "";
|
||||
|
||||
// fast-forward until we reach a '<'
|
||||
char c;
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
// check to see if this is a closing block
|
||||
if (is.get(c) && c == '/')
|
||||
while (is.good() && (closeName != blockName))
|
||||
{
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
closeName += c;
|
||||
}
|
||||
// fast-forward until we reach a '<'
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
if (closeName == blockName)
|
||||
// check to see if this is a closing block
|
||||
if (is.get(c) && c == '/')
|
||||
{
|
||||
// finished reading block
|
||||
return;
|
||||
closeName = "";
|
||||
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
closeName += c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +209,7 @@ void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
|
||||
void Foam::doxygenXmlParser::skipForward
|
||||
(
|
||||
IFstream& is,
|
||||
const word blockName
|
||||
const word& blockName
|
||||
) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across <blockName>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,10 @@ Class
|
||||
Foam::doxygenXmlParser
|
||||
|
||||
Description
|
||||
Parser for doxygen XML
|
||||
|
||||
SourceFiles
|
||||
doxygenXmlParser.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -65,10 +67,10 @@ public:
|
||||
// Member functions
|
||||
|
||||
//- Skip past a block
|
||||
void skipBlock(IFstream& is, const word blockName) const;
|
||||
void skipBlock(IFstream& is, const word& blockName) const;
|
||||
|
||||
//- Skip forward to block
|
||||
void skipForward(IFstream& is, const word blockName) const;
|
||||
void skipForward(IFstream& is, const word& blockName) const;
|
||||
|
||||
//- Return the entry
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,7 +148,12 @@ void Foam::helpType::displayDoc
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpType::displayDoc(const word, const string)"
|
||||
"void Foam::helpType::displayDoc"
|
||||
"("
|
||||
"const word&, "
|
||||
"const string&, "
|
||||
"const bool"
|
||||
")"
|
||||
)
|
||||
<< "No help for type " << className << " found."
|
||||
<< " Valid options include:" << SortableList<word>(parser.toc())
|
||||
|
||||
Reference in New Issue
Block a user