Fawkes API Fawkes Development Version
|
Class to determine the location of ECLiPSe-clp programs. More...
Public Member Functions | |
void | add_path (const std::string &path) |
Add a new path. More... | |
void | add_path_check (const std::string &path) |
Add a new path and apply regexes to all paths. More... | |
std::string | locate_file (const std::string &filename) |
Locate a file by filename. More... | |
void | add_regex (boost::regex re, const std::string &str) |
Add a regex. More... | |
void | apply_regexes () |
Apply the regexes to all paths. More... | |
void | print_all_paths () |
Debug method to print all path to the command line. More... | |
Static Public Member Functions | |
static void | create_initial_object () |
Create the initial EclipsePath object. More... | |
static EclipsePath * | instance () |
Get the EclipsePath instance. More... | |
Public Attributes | |
std::vector< std::string > | paths |
all paths known More... | |
std::map< boost::regex, std::string > | regexes |
regexes and strings they should be replaced with More... | |
Class to determine the location of ECLiPSe-clp programs.
Given a filename the complete path to that file will be specified. Paths can contain variables, which will be transformed to the string if matched by a regex.
Definition at line 31 of file eclipse_path.h.
void EclipsePath::add_path | ( | const std::string & | path | ) |
Add a new path.
path | The path to be added. |
Definition at line 79 of file eclipse_path.cpp.
References paths.
Referenced by add_path_check(), and EclipseAgentThread::init().
void EclipsePath::add_path_check | ( | const std::string & | path | ) |
Add a new path and apply regexes to all paths.
path | The path to be added. |
Definition at line 88 of file eclipse_path.cpp.
References add_path(), apply_regexes(), and instance().
void EclipsePath::add_regex | ( | boost::regex | re, |
const std::string & | str | ||
) |
Add a regex.
To apply the regex to all paths use apply_regexes().
re | the regex to be matched |
str | the string by which each instanstance of the regex will be replaced |
Definition at line 159 of file eclipse_path.cpp.
References regexes.
Referenced by create_initial_object(), and EclipseAgentThread::init().
void EclipsePath::apply_regexes | ( | ) |
Apply the regexes to all paths.
Definition at line 128 of file eclipse_path.cpp.
References paths, and regexes.
Referenced by add_path_check(), and EclipseAgentThread::init().
|
static |
Create the initial EclipsePath object.
Already supplies regexes for BASEDIR, CONFDIR and FAWKES_BASEDIR
Definition at line 54 of file eclipse_path.cpp.
References add_regex().
Referenced by EclipseAgentThread::init(), and instance().
|
static |
Get the EclipsePath instance.
Definition at line 69 of file eclipse_path.cpp.
References create_initial_object().
Referenced by add_path_check(), and EclipseAgentThread::init().
std::string EclipsePath::locate_file | ( | const std::string & | filename | ) |
Locate a file by filename.
filename | the searched filename |
Definition at line 99 of file eclipse_path.cpp.
References paths.
Referenced by EclipseAgentThread::init().
void EclipsePath::print_all_paths | ( | ) |
Debug method to print all path to the command line.
Definition at line 146 of file eclipse_path.cpp.
References paths.
Referenced by EclipseAgentThread::init().
std::vector<std::string> EclipsePath::paths |
all paths known
Definition at line 50 of file eclipse_path.h.
Referenced by add_path(), apply_regexes(), locate_file(), and print_all_paths().
std::map<boost::regex, std::string> EclipsePath::regexes |
regexes and strings they should be replaced with
Definition at line 52 of file eclipse_path.h.
Referenced by add_regex(), and apply_regexes().