#include <PfnEditor.h>
Public Member Functions | |
std::string | operator() (std::string const &pfn) const |
PfnEditor () | |
PfnEditor (std::string const &ipre, std::string const &ipos) | |
Private Attributes | |
bool | off |
std::string | postfix |
std::string | prefix |
Definition at line 10 of file PfnEditor.h.
cond::PfnEditor::PfnEditor | ( | ) |
Definition at line 5 of file PfnEditor.cc.
: off(true){}
cond::PfnEditor::PfnEditor | ( | std::string const & | ipre, |
std::string const & | ipos | ||
) |
std::string cond::PfnEditor::operator() | ( | std::string const & | pfn | ) | const |
Definition at line 15 of file PfnEditor.cc.
References off, dbtoconf::pfn, pos, postfix, and prefix.
{ if (off) return pfn; // FIXME ad-hoc if (pfn.find("FrontierInt")!=std::string::npos) return pfn; if (pfn.find("FrontierPrep")!=std::string::npos) return pfn; if (pfn.find("sqlite")!=std::string::npos) return pfn; size_t pos=std::string::npos; if (!prefix.empty()) pos = pfn.rfind('/'); return prefix + ( (pos == std::string::npos) ? pfn : pfn.substr(pos+1) ) + postfix; }
bool cond::PfnEditor::off [private] |
Definition at line 21 of file PfnEditor.h.
Referenced by operator()().
std::string cond::PfnEditor::postfix [private] |
Definition at line 20 of file PfnEditor.h.
Referenced by operator()().
std::string cond::PfnEditor::prefix [private] |
Definition at line 19 of file PfnEditor.h.
Referenced by operator()().