Go to the documentation of this file.
57 Info<<
"No Doxygen sources found under search paths: "
68 const string& searchStr,
69 const bool exactMatch,
73 fileName doxyPath(doxygenPath());
80 Info<<
"Found doxygen help in " << doxyPath.c_str() <<
nl <<
endl;
82 doxygenXmlParser parser
96 Info<<
"Valid types include:" << nl << SortableList<word>(parser.toc());
102 const word& className,
103 const string& searchStr,
104 const bool exactMatch,
108 fileName doxyPath(doxygenPath());
110 if (doxyPath.empty())
115 Info<<
"Found doxygen help in " << doxyPath.c_str() <<
nl <<
endl;
117 string docBrowser =
getEnv(
"FOAM_DOC_BROWSER");
118 if (docBrowser.empty())
120 const dictionary& docDict =
122 docDict.
lookup(
"docBrowser") >> docBrowser;
125 doxygenXmlParser parser
139 if (parser.found(className))
141 fileName docFile(doxyPath/parser.subDict(className).lookup(
"filename"));
144 docBrowser.replaceAll(
"%f", docFile);
146 fileName classDirectory(parser.subDict(className).lookup(
"path"));
147 word classFile(parser.subDict(className).lookup(
"name"));
149 Info<<
"Showing documentation for type " << className <<
nl <<
endl;
151 Info<<
"Source file: " << classDirectory.c_str() << classFile <<
nl
159 <<
"No help for type " << className <<
" found."
160 <<
" Valid options include:" << SortableList<word>(parser.toc())
186 "display documentation in browser"
virtual ~helpType()
Destructor.
A class for handling file names.
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
#define forAll(list, i)
Loop across all elements in list.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual void init()
Initialise - typically setting static variables,.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
fileName doxygenPath() const
Return file path to the Doxygen sources (if available)
Ostream & endl(Ostream &os)
Add newline and flush stream.
string getEnv(const word &)
Return environment variable of given name.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void displayDocOptions(const string &searchStr, const bool exactMatch, const word &ext) const
Display the list of documentation options.
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void displayDoc(const word &className, const string &searchStr, const bool exactMatch, const word &ext) const
Display the help documentation in a browser.
dictionary & controlDict()
The central control dictionary.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
defineTypeNameAndDebug(combustionModel, 0)
int system(const std::string &command)
Execute the specified command.
string expand(const string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Expand occurences of variables according to the mapping.