Regina Calculation Engine
Static Public Member Functions
regina::NGlobalDirs Class Reference

Provides global routines that return directories in which various components of Regina are installed on the system. More...

#include <file/nglobaldirs.h>

List of all members.

Static Public Member Functions

static std::string home ()
 Returns Regina's primary home directory on the system.
static std::string pythonModule ()
 Returns the directory in which Regina's python module is installed.
static std::string pythonLibs ()
 Returns the directory in which optional "helper" Python libraries are installed.
static std::string examples ()
 Returns the directory in which example data files and census data files are installed.
static std::string engineDocs ()
 Returns the directory in which API documentation for Regina's calculation engine is installed.
static std::string data ()
 Returns the directory containing internal data files for Regina's calculation engine.
static void setDirs (const std::string &homeDir, const std::string &pythonModuleDir)
 Tells Regina where data files are installed.

Detailed Description

Provides global routines that return directories in which various components of Regina are installed on the system.

By default, these routines are only useful with a fixed filesystem installation of Regina (e.g., a typical Linux install). Specifically, they return the relevant directories as they were configured by cmake at build time.

If Regina may have been moved around on the filesystem (e.g., if you are running an app bundle on MacOS), you must call setDirs() when your application starts. Otherwise the directories that NGlobalDirs might be incorrect, and might not even exist.

At present this class does not support running Regina directly out of the source tree. This might be supported in future versions of Regina.


Member Function Documentation

static std::string regina::NGlobalDirs::data ( ) [static]

Returns the directory containing internal data files for Regina's calculation engine.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's calculation engine data directory.
static std::string regina::NGlobalDirs::engineDocs ( ) [static]

Returns the directory in which API documentation for Regina's calculation engine is installed.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's calculation engine documentation directory.
static std::string regina::NGlobalDirs::examples ( ) [static]

Returns the directory in which example data files and census data files are installed.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's example and census data directory.
static std::string regina::NGlobalDirs::home ( ) [static]

Returns Regina's primary home directory on the system.

This directory should contains subdirectories scripts/, icons/, examples/ and so on.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's primary home directory.
static std::string regina::NGlobalDirs::pythonLibs ( ) [static]

Returns the directory in which optional "helper" Python libraries are installed.

These libraries are not a formal part of Regina, but can be made to load automatically as extra user libraries through Regina's python settings.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's optional Python library directory.
static std::string regina::NGlobalDirs::pythonModule ( ) [static]

Returns the directory in which Regina's python module is installed.

Warning:
If Regina is not installed in the exact location configured at compile time (e.g., if you are running a MacOSX app bundle), you must call setDirs() before calling this routine.
If you are running out of the source tree, this routine will almost certainly return an incorrect (and possibly non-existent) directory.
Returns:
Regina's python module directory.
static void regina::NGlobalDirs::setDirs ( const std::string &  homeDir,
const std::string &  pythonModuleDir 
) [static]

Tells Regina where data files are installed.

This is necessary if Regina is not installed in the location that was configured by cmake at build time (e.g., if you are running a MacOSX app bundle).

Parameters:
homeDirRegina's primary home directory, which will be returned by homeDir().
pythonModuleDirthe directory containing Regina's python module, which will be returned by pythonModule().

The documentation for this class was generated from the following file:

Copyright © 1999-2012, The Regina development team
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).