Fawkes API
Fawkes Development Version
|
Class to determine the location of ECLiPSe-clp programs. More...
Public Member Functions | |
void | add_path (std::string path) |
Add a new path. More... | |
void | add_path_check (std::string path) |
Add a new path and apply regexes to all paths. More... | |
std::string | locate_file (std::string filename) |
Locate a file by filename. More... | |
void | add_regex (boost::regex re, 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 | ( | std::string | path | ) |
Add a new path.
path | The path to be added. |
Definition at line 79 of file eclipse_path.cpp.
Referenced by EclipseAgentThread::init().
void EclipsePath::add_path_check | ( | std::string | path | ) |
Add a new path and apply regexes to all paths.
path | The path to be added. |
Definition at line 89 of file eclipse_path.cpp.
void EclipsePath::add_regex | ( | boost::regex | re, |
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 163 of file eclipse_path.cpp.
References instance(), and locate_file().
Referenced by EclipseAgentThread::init().
void EclipsePath::apply_regexes | ( | ) |
Apply the regexes to all paths.
Definition at line 132 of file eclipse_path.cpp.
Referenced by 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.
Referenced by EclipseAgentThread::init().
|
static |
Get the EclipsePath instance.
Definition at line 67 of file eclipse_path.cpp.
Referenced by add_regex(), and EclipseAgentThread::init().
std::string EclipsePath::locate_file | ( | std::string | filename | ) |
Locate a file by filename.
filename | the searched filename |
Definition at line 100 of file eclipse_path.cpp.
Referenced by add_regex(), and EclipseAgentThread::init().
void EclipsePath::print_all_paths | ( | ) |
Debug method to print all path to the command line.
Definition at line 150 of file eclipse_path.cpp.
Referenced by EclipseAgentThread::init().
std::vector<std::string> EclipsePath::paths |
all paths known
Definition at line 49 of file eclipse_path.h.
std::map<boost::regex, std::string> EclipsePath::regexes |
regexes and strings they should be replaced with
Definition at line 50 of file eclipse_path.h.