26#include <boost/optional.hpp>
27#include <ql/shared_ptr.hpp>
40 explicit Wildcard(
const std::string&
pattern,
const bool usePrefixes =
true,
const bool aggressivePrefixes =
false);
46 bool matches(
const std::string& s)
const;
48 const std::string&
pattern()
const;
49 const std::string&
regex()
const;
50 const std::string&
prefix()
const;
61 mutable QuantLib::ext::shared_ptr<std::regex>
regex_;
66 for (
auto const& a : c) {
69 QL_REQUIRE(c.size() == 1,
"If wild cards are used, only one entry should exist.");
78void partitionQuotes(
const std::set<std::string>& quoteNames, std::set<std::string>& names,
79 std::set<std::string>& regexes);
82void partitionQuotes(
const std::set<std::string>& quoteNames, std::set<std::string>& names,
83 std::set<std::string>& regexes, std::set<std::string>& prefixes,
84 const bool aggressivePrefixes =
false);
boost::optional< std::string > prefixString_
const std::string & pattern() const
bool matches(const std::string &s) const
std::size_t wildcardPos() const
boost::optional< std::string > regexString_
QuantLib::ext::shared_ptr< std::regex > regex_
const std::string & prefix() const
const std::string & regex() const
void partitionQuotes(const set< string > "eNames, set< string > &names, set< string > ®exes)
boost::optional< Wildcard > getUniqueWildcard(const C &c)
checks if at most one element in C has a wild card and returns it in this case
Serializable Credit Default Swap.