21 #ifndef ADDRESSHANDLER_HPP 22 #define ADDRESSHANDLER_HPP 32 template<
typename T = u
int>
38 std::string wildcard_;
49 const std::string& wildcard =
"?" ) :
51 wildcard_ ( wildcard ) {
59 inline const std::string
get ( T idx ) {
60 std::string tmpaddress = address_;
61 LDEBUG (
"Parsing [" << tmpaddress <<
"]=>" << idx );
62 parse ( idx, tmpaddress );
91 inline void parse ( T idx, std::string& tmpaddress ) {
class that expands a wildcard into its actual value. This is useful e.g. for filenames ranging severa...
const std::string operator()()
Returns original string, without replacing any wildcard.
PatternAddress(const std::string &address, const std::string &wildcard="?")
Constructor.
PatternAddress< uint > IntegerPatternAddress
void find_and_replace(std::string &haystack, const std::string &needle, const std::string &replace)