Skip to content
Snippets Groups Projects
Commit c063a100 authored by andy's avatar andy
Browse files

ENH: Updated foamHelp utility

parent 0499f534
Branches
Tags
No related merge requests found
......@@ -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,46 +176,40 @@ 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;
}
else
{
skipBlock(is, blockName);
closeName = "";
while (is.get(c) && c != '>')
{
closeName += c;
}
}
}
else
{
skipBlock(is, blockName);
}
}
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())
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment