30 isTracked_(isTracked),
31 hasDefault_(hasDefault) {
34 <<
"Empty string used as a label for a parameter. This is\n" 49 <<
"Empty string used as a label for a parameter. This is\n" 66 <<
"In the configuration, parameter \"" <<
label() <<
"\" is defined " 68 <<
"It should be " << shouldBe <<
".\n";
77 <<
"Parameter \"" <<
label() <<
"\" should be defined " 79 <<
"The type in the configuration is incorrect.\n";
89 <<
"Missing required parameter. It should have label \"" 90 <<
label() <<
"\" and have type \"" 92 <<
"The description has no default. The parameter must be defined " 93 "in the configuration\n";
99 std::set<ParameterTypes>& parameterTypes,
100 std::set<ParameterTypes>& )
const {
101 usedLabels.insert(
label());
102 parameterTypes.insert(
type());
108 std::set<std::string>& validatedLabels,
109 bool optional)
const {
114 validatedLabels.insert(
label());
121 if(!exists && !optional) {
124 validatedLabels.insert(
label());
134 bool& startWithComma,
136 bool& wroteSomething)
const {
140 wroteSomething =
true;
141 if(startWithComma) os <<
",";
142 startWithComma =
true;
162 if(dfh.
pass() == 0) {
175 std::ios::fmtflags oldFlags = os.flags();
178 os << std::left << std::setw(dfh.
column1()) <<
label() <<
" ";
183 std::stringstream ss;
186 os << std::setw(dfh.
column2()) << ss.str();
190 os << std::setw(dfh.
column3());
202 os <<
label() <<
"\n";
210 if(optional) os <<
"optional";
232 if(!dfh.
brief()) os <<
"default: ";
235 os <<
"see Section " << dfh.
section()
245 os <<
"none (do not write to cfi)";
262 <<
" " <<
label() <<
" default contents: ";
265 if(!dfh.
brief()) os <<
"\n";
277 return exists(pset) ? 1 : 0;
virtual void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual void printDefault_(std::ostream &os, bool writeToCfi, DocFormatHelper &dfh) const
virtual ~ParameterDescriptionBase()
std::string parameterTypeEnumToString(ParameterTypes iType)
virtual void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault)
void throwMissingRequiredNoDefault() const
std::string const & comment() const
virtual void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) 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
virtual bool exists_(ParameterSet const &pset, bool isTracked) const =0
static void printSpaces(std::ostream &os, int n)
bool exists(ParameterSet const &pset) const
virtual bool partiallyExists_(ParameterSet const &pset) const
ParameterTypes type() const
bool hasNestedContent() const
virtual void insertDefault_(ParameterSet &pset) const =0
void throwParameterWrongTrackiness() const
virtual void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const
virtual void writeDoc_(std::ostream &os, int indentation) const =0
std::string const & label() const