Canola
0.8.D001
|
#include <search_path.h>
Public Member Functions | |
~search_path () | |
search_path () | |
search_path (const std::string &subdir, bool dot=false) | |
void | append (const std::string &dir) |
std::string | find (const std::string &filename) |
Private Types | |
typedef std::list< std::string > | path_t |
Private Member Functions | |
search_path (const search_path &rhs) | |
search_path & | operator= (const search_path &rhs) |
Private Attributes | |
std::string | subdir |
bool | have_system |
path_t | path |
The search_path class is used to represent the processing required to walk a list of directories, looking for the specified file.
Definition at line 29 of file search_path.h.
typedef std::list<std::string> search_path::path_t [private] |
Definition at line 90 of file search_path.h.
The destructor. It is not virtual, thou shalt not derive from this class.
Definition at line 28 of file search_path.cc.
The default constructor.
Definition at line 33 of file search_path.cc.
search_path::search_path | ( | const std::string & | subdir, |
bool | dot = false |
||
) |
A constructor.
subdir | A sub-directory to look for, and look into. |
dot | Always incldude the current directory at the start of the path. |
Definition at line 39 of file search_path.cc.
search_path::search_path | ( | const search_path & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
void search_path::append | ( | const std::string & | dir | ) |
The append method is used to appeand a directory to the end of the search path.
dir | The directory of interest. |
Definition at line 57 of file search_path.cc.
std::string search_path::find | ( | const std::string & | filename | ) |
The find method is used to locate the named file in the directory search path.
filename | The name of the file to be searched for, |
Definition at line 71 of file search_path.cc.
search_path& search_path::operator= | ( | const search_path & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The right hand side of the assignment. |
bool search_path::have_system [private] |
The have_system instance variable is used to remember whether or not the ${prefix}/share/{progrname} directory has been appeneded to the end of the search path.
Definition at line 88 of file search_path.h.
path_t search_path::path [private] |
The path instance variable is used to remember the ordered list of directories to be search for files.
Definition at line 96 of file search_path.h.
std::string search_path::subdir [private] |
The subdir instance variable is used to remember the name of the subdirectory that may be present in each of the diretcories nominated to be searched.
Definition at line 81 of file search_path.h.