frepple::utils::Environment Class Reference

This class groups some functions used to interact with the operating system environment. More...

#include <utils.h>

List of all members.

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:

Definition at line 299 of file utils.h.


Member Function Documentation

static const string& frepple::utils::Environment::getLogFile (  )  [inline, static]

Returns the name of the logfile.

Definition at line 334 of file utils.h.

static int frepple::utils::Environment::getProcessors (  )  [inline, static]

Returns the number of processors on your machine.

Definition at line 328 of file utils.h.

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]

Updates the number of processors available on your machine.

Definition at line 331 of file utils.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208