29 isTracked_(isTracked),
30 hasDefault_(hasDefault)
34 <<
"Empty string used as a label for a parameter. This is\n"
45 isTracked_(isTracked),
46 hasDefault_(hasDefault)
50 <<
"Empty string used as a label for a parameter. This is\n"
59 std::string tr(
"a tracked");
60 std::string shouldBe(
"untracked");
67 <<
"In the configuration, parameter \"" <<
label() <<
"\" is defined "
69 <<
"It should be " << shouldBe <<
".\n";
74 std::string tr(
"an untracked");
78 <<
"Parameter \"" <<
label() <<
"\" should be defined "
80 <<
"The type in the configuration is incorrect.\n";
86 std::string tr(
"untracked");
90 <<
"Missing required parameter. It should have label \""
91 <<
label() <<
"\" and have type \""
93 <<
"The description has no default. The parameter must be defined "
94 "in the configuration\n";
100 std::set<ParameterTypes> & parameterTypes,
101 std::set<ParameterTypes> & wildcardTypes)
const {
102 usedLabels.insert(
label());
103 parameterTypes.insert(
type());
109 std::set<std::string> & validatedLabels,
110 bool optional)
const {
115 validatedLabels.insert(
label());
124 if (!exists && !optional) {
127 validatedLabels.insert(
label());
138 bool & startWithComma,
140 bool & wroteSomething)
const {
144 wroteSomething =
true;
145 if (startWithComma) os <<
",";
146 startWithComma =
true;
167 if (dfh.
pass() == 0) {
182 std::ios::fmtflags oldFlags = os.flags();
185 os << std::left << std::setw(dfh.
column1()) <<
label() <<
" ";
191 std::stringstream ss;
194 os << std::setw(dfh.
column2()) << ss.str();
198 os << std::setw(dfh.
column3());
213 os <<
label() <<
"\n";
221 if (optional) os <<
"optional";
243 if (!dfh.
brief()) os <<
"default: ";
246 os <<
"see Section " << dfh.
section()
259 os <<
"none (do not write to cfi)";
276 <<
" " <<
label() <<
" default contents: ";
279 if (!dfh.
brief()) os <<
"\n";
291 return exists(pset) ? 1 : 0;
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual ~ParameterDescriptionBase()
std::string parameterTypeEnumToString(ParameterTypes iType)
virtual void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
virtual void printDefault_(std::ostream &os, bool writeToCfi, DocFormatHelper &dfh)
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault)
void throwMissingRequiredNoDefault() const
std::string const & comment() const
virtual int howManyXORSubNodesExist_(ParameterSet const &pset) const
virtual void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const
void throwParameterWrongType() const
static void printSpaces(std::ostream &os, int n)
bool exists(ParameterSet const &pset) const
virtual bool partiallyExists_(ParameterSet const &pset) const
ParameterTypes type() const
void throwParameterWrongTrackiness() const
virtual bool exists_(ParameterSet const &pset, bool isTracked) const =0
virtual void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
virtual void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh)
virtual void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh)
virtual void insertDefault_(ParameterSet &pset) const =0
virtual void writeDoc_(std::ostream &os, int indentation) const =0
tuple size
Write out results.
std::string const & label() const