diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C index acf9a72d2406dcfa843de9092ba8885e21952ab7..ac9c639c497956968433375dc05fc8123f71c9a3 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C @@ -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> diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H index f2abdaee8d4f6c9f9e071b807f80e4e5b92663cf..9853589fa3e3b688a55b9923bddece682b8e188b 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H @@ -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> diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index 0b982e76a7e03a466df79b076609b570ba810060..29ad9ddbde30963b7001891fd3c5127612ac81cb 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C @@ -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())