mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added displayDocOptions for default behaviour when no arg specified
This commit is contained in:
@ -179,6 +179,13 @@ void Foam::helpTypes::helpBoundary::execute
|
|||||||
<< "-field option must be specified when using the -fixedValue "
|
<< "-field option must be specified when using the -fixedValue "
|
||||||
<< "option" << exit(FatalError);
|
<< "option" << exit(FatalError);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// TODO: strip scoping info if present?
|
||||||
|
// e.g. conditions with leading "compressible::" will not be found
|
||||||
|
// ".*[fF]vPatchField.*" + className + ".*"
|
||||||
|
displayDocOptions(".*[fF]vPatchField.*", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,6 +78,10 @@ void Foam::helpTypes::helpFunctionObject::execute
|
|||||||
{
|
{
|
||||||
displayDoc(function, ".*[fF]unctionObject.*", true);
|
displayDoc(function, ".*[fF]unctionObject.*", true);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
displayDocOptions(".*[fF]unctionObject.*", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,53 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::helpType::displayDocOptions
|
||||||
|
(
|
||||||
|
const string& searchStr,
|
||||||
|
const bool exactMatch
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
const dictionary& docDict = debug::controlDict().subDict("Documentation");
|
||||||
|
List<fileName> docDirs(docDict.lookup("doxyDocDirs"));
|
||||||
|
|
||||||
|
label i = -1;
|
||||||
|
forAll(docDirs, dirI)
|
||||||
|
{
|
||||||
|
if (isDir(docDirs[dirI].expand()))
|
||||||
|
{
|
||||||
|
i = dirI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i != -1)
|
||||||
|
{
|
||||||
|
Info<< "Found doxygen help in " << docDirs[i].c_str() << nl << endl;
|
||||||
|
|
||||||
|
string docBrowser = getEnv("FOAM_DOC_BROWSER");
|
||||||
|
if (docBrowser.empty())
|
||||||
|
{
|
||||||
|
docDict.lookup("docBrowser") >> docBrowser;
|
||||||
|
}
|
||||||
|
|
||||||
|
doxygenXmlParser parser
|
||||||
|
(
|
||||||
|
docDirs[i]/"../DTAGS",
|
||||||
|
"tagfile",
|
||||||
|
searchStr,
|
||||||
|
exactMatch
|
||||||
|
);
|
||||||
|
|
||||||
|
Info<< "Valid types include:" << nl << SortableList<word>(parser.toc());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< "No Doxygen sources found under search paths: "
|
||||||
|
<< docDirs << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::helpType::displayDoc
|
void Foam::helpType::displayDoc
|
||||||
(
|
(
|
||||||
const word& className,
|
const word& className,
|
||||||
|
|||||||
@ -58,6 +58,13 @@ class helpType
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
//- Display the list of documentation options
|
||||||
|
void displayDocOptions
|
||||||
|
(
|
||||||
|
const string& searchStr,
|
||||||
|
const bool exactMatch
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Display the help documentation in a browser
|
//- Display the help documentation in a browser
|
||||||
void displayDoc
|
void displayDoc
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user