44 List<fileName> docDirs(docDict.lookup(
"doxyDocDirs"));
58 Info<<
"No Doxygen sources found under search paths: " 69 const string& searchStr,
70 const bool exactMatch,
74 fileName doxyPath(doxygenPath());
81 Info<<
"Found doxygen help in " << doxyPath.c_str() <<
nl <<
endl;
83 doxygenXmlParser parser
97 Info<<
"Valid types:" <<
nl << parser.sortedToc();
103 const word& className,
104 const string& searchStr,
105 const bool exactMatch,
109 fileName doxyPath(doxygenPath());
111 if (doxyPath.empty())
116 Info<<
"Found doxygen help in " << doxyPath.c_str() <<
nl <<
endl;
118 string docBrowser =
getEnv(
"FOAM_DOC_BROWSER");
119 if (docBrowser.empty())
123 docDict.
readEntry(
"docBrowser", docBrowser);
126 doxygenXmlParser parser
140 if (parser.found(className))
144 doxyPath/parser.subDict(className).get<fileName>(
"filename")
148 docBrowser.replaceAll(
"%f", docFile);
150 fileName classDirectory
152 parser.subDict(className).get<fileName>(
"path")
156 parser.subDict(className).get<word>(
"name")
159 Info<<
"Showing documentation for type " << className <<
nl <<
endl;
161 Info<<
"Source file: " << classDirectory.c_str() << classFile <<
nl 169 <<
"No help for type " << className <<
" found." 170 <<
" Valid options:" << parser.sortedToc()
184 "Display documentation in browser" void displayDocOptions(const string &searchStr, const bool exactMatch, const word &ext) const
Display the list of documentation options.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
string getEnv(const std::string &envName)
Get environment value for given envName.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
#define forAll(list, i)
Loop across all elements in list.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
void displayDoc(const word &className, const string &searchStr, const bool exactMatch, const word &ext) const
Display the help documentation in a browser.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
fileName doxygenPath() const
Return file path to the Doxygen sources (if available)
messageStream Info
Information stream (stdout output on master, null elsewhere)
int system(const std::string &command, const bool bg=false)
Execute the specified command via the shell.
dictionary & controlDict()
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
virtual void init()
Initialise - typically setting static variables,.
string expand(const std::string &s, const HashTable< string > &mapping, const char sigil='$')
Expand occurrences of variables according to the mapping and return the expanded string.