Public Member Functions |
|
| ConfigVariableSearchPath (const string &name, const string &description=string(), int flags=0) |
|
| ConfigVariableSearchPath (const string &name, const DSearchPath &default_value, const string &description, int flags=0) |
|
| ConfigVariableSearchPath (const string &name, const string &default_value, const string &description, int flags=0) |
| void | append_directory (const Filename &directory) |
| | Adds a new directory to the end of the search list.
|
| void | append_path (const string &path, const string &separator=string()) |
| | Adds all of the directories listed in the search path to the end of the search list.
|
| void | append_path (const DSearchPath &path) |
| | Adds all of the directories listed in the search path to the end of the search list.
|
| void | clear () |
| | Removes all the directories locally added to the search list, and restores it to its original form.
|
| bool | clear_local_value () |
| | Removes all the directories locally added to the search list, and restores it to its original form.
|
| DSearchPath::Results | find_all_files (const Filename &filename) const |
| | This variant of find_all_files() returns the new Results object, instead of filling on in on the parameter list.
|
| int | find_all_files (const Filename &filename, DSearchPath::Results &results) const |
| | Searches all the directories in the search list for the indicated file, in order.
|
| Filename | find_file (const Filename &filename) const |
| | Searches all the directories in the search list for the indicated file, in order.
|
|
const DSearchPath & | get_default_value () const |
| const Filename & | get_directory (int n) const |
| | Returns the nth directory on the search list.
|
| int | get_num_directories () const |
| | Returns the number of directories on the search list.
|
|
const DSearchPath & | get_value () const |
| bool | is_empty () const |
| | Returns true if the search list is empty, false otherwise.
|
|
| MAKE_SEQ (get_directories, get_num_directories, get_directory) |
| | operator const DSearchPath & () const |
| | Returns the variable's value.
|
|
void | output (ostream &out) const |
| void | prepend_directory (const Filename &directory) |
| | Adds a new directory to the front of the search list.
|
| void | prepend_path (const DSearchPath &path) |
| | Adds all of the directories listed in the search path to the beginning of the search list.
|
|
void | write (ostream &out) const |
This is similar to a ConfigVariableList, but it returns its list as a DSearchPath, as a list of directories.
You may locally append directories to the end of the search path with the methods here, or prepend them to the beginning. Use these methods to make adjustments to the path; do not attempt to directly modify the const DSearchPath object returned by get_value().
Unlike other ConfigVariable types, local changes (made by calling append_directory() and prepend_directory()) are specific to this particular instance of the ConfigVariableSearchPath. A separate instance of the same variable, created by using the same name to the constructor, will not reflect the local changes.
Definition at line 42 of file configVariableSearchPath.h.
Searches all the directories in the search list for the indicated file, in order.
Fills up the results list with *all* of the matching filenames found, if any. Returns the number of matches found.
It is the responsibility of the the caller to clear the results list first; otherwise, the newly-found files will be appended to the list.
Definition at line 284 of file configVariableSearchPath.I.
References DSearchPath::find_all_files().