18 : type_(iType), isTracked_(isTracked), criteria_(criteria) {}
28 <<
"Currently, the only supported wildcard in ParameterSetDescriptions\n" 29 <<
"is the single character \"*\". The configuration contains a wildcard\n" 31 <<
"At some future date, globbing or regular expression support may be added\n" 32 <<
"if there are any requests for it from users.\n";
37 std::set<std::string>& validatedLabels,
39 validatedLabels.insert(matchingNames.begin(), matchingNames.end());
45 <<
"at least one match\n" 46 <<
"and there are no parameters in the configuration matching\n" 49 if ((matchingNames.empty() && !
optional) || matchingNames.size() > 1
U) {
52 <<
"exactly one match and there are " << matchingNames.size() <<
" matching parameters\n" 53 <<
"in the configuration.\n";
59 std::set<ParameterTypes>& ,
60 std::set<ParameterTypes>& wildcardTypes)
const {
61 wildcardTypes.insert(
type());
65 if (dfh.
pass() == 0) {
76 std::ios::fmtflags oldFlags = os.flags();
77 os << std::left << std::setw(dfh.
column1()) <<
"wildcard: *" 96 os <<
" (require zero or more)";
98 os <<
" (require at least one)";
100 os <<
" (require exactly one)";
105 os <<
" (see Section " << dfh.
section() <<
"." << dfh.
counter() <<
")\n";
112 os <<
"labels must match this wildcard pattern: *\n";
129 os <<
"require zero or more";
131 os <<
"require at least one";
133 os <<
"require exactly one";
138 os <<
"(see Section " << dfh.
section() <<
"." << dfh.
counter() <<
")\n";
150 std::ostream&,
bool ,
bool& ,
int ,
bool& )
const {
WildcardValidationCriteria
void writeCfi_(std::ostream &os, bool optional, bool &startWithComma, int indentation, bool &wroteSomething) const override
bool partiallyExists_(ParameterSet const &pset) const override
void throwIfInvalidPattern(char const *pattern) const
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
~ParameterWildcardBase() override
std::string parameterTypeEnumToString(ParameterTypes iType)
WildcardValidationCriteria criteria_
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
ParameterTypes type() const
WildcardValidationCriteria criteria() const
std::string const & comment() const
bool exists(ParameterSet const &pset) const
bool hasNestedContent() const
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)