19 isTracked_(isTracked),
35 <<
"Currently, the only supported wildcard in ParameterSetDescriptions\n"
36 <<
"is the single character \"*\". The configuration contains a wildcard\n"
38 <<
"At some future date, globbing or regular expression support may be added\n"
39 <<
"if there are any requests for it from users.\n";
46 std::set<std::string>& validatedLabels,
47 bool optional)
const {
48 validatedLabels.insert(matchingNames.begin(), matchingNames.end());
53 <<
"at least one match\n"
54 <<
"and there are no parameters in the configuration matching\n"
57 if((matchingNames.size() < 1U && !optional) ||
58 matchingNames.size() > 1U) {
61 <<
"exactly one match and there are " << matchingNames.size() <<
" matching parameters\n"
62 <<
"in the configuration.\n";
70 std::set<ParameterTypes>& ,
71 std::set<ParameterTypes>& wildcardTypes)
const {
72 wildcardTypes.insert(
type());
94 std::ios::fmtflags oldFlags = os.flags();
95 os << std::left << std::setw(dfh.
column1()) <<
"wildcard: *" <<
" ";
100 std::stringstream
ss;
106 os << std::setw(dfh.
column3());
107 if(optional) os <<
"optional";
111 os <<
" (require zero or more)";
113 os <<
" (require at least one)";
115 os <<
" (require exactly one)";
120 os <<
" (see Section " << dfh.
section()
121 <<
"." << dfh.
counter() <<
")\n";
128 os <<
"labels must match this wildcard pattern: *\n";
138 if(optional) os <<
" optional";
150 os <<
"(see Section " << dfh.
section()
151 <<
"." << dfh.
counter() <<
")\n";
184 return exists(pset) ? 1 : 0;
WildcardValidationCriteria
ParameterTypes type() const
virtual void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const
std::string parameterTypeEnumToString(ParameterTypes iType)
WildcardValidationCriteria criteria_
std::string const & comment() const
virtual bool partiallyExists_(ParameterSet const &pset) const
bool exists(ParameterSet const &pset) const
WildcardValidationCriteria criteria() const
bool hasNestedContent() const
virtual void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const
void throwIfInvalidPattern(char const *pattern) const
virtual void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
void validateMatchingNames(std::vector< std::string > const &matchingNames, std::set< std::string > &validatedLabels, bool optional) const
tuple size
Write out results.
virtual int howManyXORSubNodesExist_(ParameterSet const &pset) const
ParameterWildcardBase(ParameterTypes iType, bool isTracked, WildcardValidationCriteria criteria)
virtual ~ParameterWildcardBase()