#include <BALL/SYSTEM/path.h>
List of all members.
Detailed Description
Data path management class. This class is intended to provide a unique interface to directories where the data files needed by BALL reside.
- Path is a singleton, so there is only one unique application-wide instance of and changes to this will be seen by all classes using path.
Constructor & Destructor Documentation
Member Function Documentation
void BALL::Path::addDataPath |
( |
const string & |
path |
) |
|
Add a single path to the list of paths.
- Parameters:
-
| path | the path to be added to the path list |
void BALL::Path::buildPathArray_ |
( |
|
) |
[protected] |
string BALL::Path::find |
( |
const string & |
name |
) |
|
string BALL::Path::findStrict |
( |
const string & |
name |
) |
|
Returns the full path to a file residing in one of the data directories.
- See also:
- find
string BALL::Path::getDataPath |
( |
|
) |
|
Return a list of paths to the BALL data directories. This directory is set to a default value at compile time of the library. It may be overridden at runtime by setting the environment variable "BALL_DATA" to the desired value. This value is then prepended to the list of directories. Directories are separated by linefeeds and returned as a single string. To locate files in these directories, find will search the directories in the specified order.
The default path may be accessed using getDefaultDataPath . The path may also be modified at runtime by calling setDataPath .
The path contains a newline ("\n") separated list of paths that are searched in the order of occurence.
string BALL::Path::getDefaultDataPath |
( |
|
) |
|
Returns the default data path compiled into the library. This method ignores possible contents of the environment variable "BALL\_DATA".
void BALL::Path::reset |
( |
|
) |
|
Reset the path variable to its default state (as it was a the start of the application).
void BALL::Path::setDataPath |
( |
const string & |
path |
) |
|
Modify the data path. This method accepts a newline separated list of paths to specify data paths.
Member Data Documentation