frepple::utils::Environment Class Reference
This class groups some functions used to interact with the operating system environment. More...
#include <utils.h>
Static Public Member Functions | |
static const string & | getLogFile () |
static int | getProcessors () |
static string | searchFile (const string) |
static void | setLogFile (const string &x) |
static void | setProcessors (int i) |
Detailed Description
This class groups some functions used to interact with the operating system environment.
It handles:
- The location of the configuration files.
- The maximum number of processors / threads to be used by frePPLe.
- An output stream for logging all output.
Definition at line 470 of file utils.h.
Member Function Documentation
static const string& frepple::utils::Environment::getLogFile | ( | ) | [inline, static] |
static int frepple::utils::Environment::getProcessors | ( | ) | [inline, static] |
string frepple::utils::Environment::searchFile | ( | const string | filename | ) | [static] |
Search for a file with a given name.
The following directories are searched in sequence to find a match:
- The current directory.
- The directory reffered to by the variable FREPPLE_HOME, if it is defined.
- The data directory as configured during the compilation. This applies only to linux / unix.
- The library directory as configured during the compilation. This applies only to linux / unix.
Definition at line 69 of file utils/library.cpp.
void frepple::utils::Environment::setLogFile | ( | const string & | x | ) | [static] |
Updates the filename for logging error messages and warnings. The file is also opened for writing and the standard output and standard error output streams are redirected to it.
If the filename starts with '+' the log file is appended to instead of being overwritten.
Definition at line 125 of file utils/library.cpp.
static void frepple::utils::Environment::setProcessors | ( | int | i | ) | [inline, static] |
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
