32 isTracked_(isTracked),
33 hasDefault_(hasDefault) {
36 <<
"Empty string used as a label for a parameter. This is\n" 53 <<
"Empty string used as a label for a parameter. This is\n" 70 <<
"In the configuration, parameter \"" <<
label() <<
"\" is defined " 72 <<
"It should be " << shouldBe <<
".\n";
81 <<
"Parameter \"" <<
label() <<
"\" should be defined " 83 <<
"The type in the configuration is incorrect.\n";
93 <<
"Missing required parameter. It should have label \"" 94 <<
label() <<
"\" and have type \"" 96 <<
"The description has no default. The parameter must be defined " 97 "in the configuration\n";
103 std::set<ParameterTypes>& parameterTypes,
104 std::set<ParameterTypes>& )
const {
105 usedLabels.insert(
label());
106 parameterTypes.insert(
type());
112 std::set<std::string>& validatedLabels,
113 bool optional)
const {
118 validatedLabels.insert(
label());
125 if(!exists && !optional) {
128 validatedLabels.insert(
label());
138 bool& startWithComma,
140 bool& wroteSomething)
const {
144 wroteSomething =
true;
145 if(startWithComma) os <<
",";
146 startWithComma =
true;
166 if(dfh.
pass() == 0) {
179 std::ios::fmtflags oldFlags = os.flags();
182 os << std::left << std::setw(dfh.
column1()) <<
label() <<
" ";
187 std::stringstream ss;
190 os << std::setw(dfh.
column2()) << ss.str();
194 os << std::setw(dfh.
column3());
206 os <<
label() <<
"\n";
214 if(optional) os <<
"optional";
236 if(!dfh.
brief()) os <<
"default: ";
239 os <<
"see Section " << dfh.
section()
249 os <<
"none (do not write to cfi)";
266 <<
" " <<
label() <<
" default contents: ";
269 if(!dfh.
brief()) os <<
"\n";
281 return exists(pset) ? 1 : 0;
void writeCfi_(std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething) const override
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual void printDefault_(std::ostream &os, bool writeToCfi, DocFormatHelper &dfh) const
~ParameterDescriptionBase() override
std::string parameterTypeEnumToString(ParameterTypes iType)
bool partiallyExists_(ParameterSet const &pset) const override
void print_(std::ostream &os, bool optional, bool writeToCfi, DocFormatHelper &dfh) const override
void throwMissingRequiredNoDefault() const
std::string const & comment() const
int howManyXORSubNodesExist_(ParameterSet const &pset) const override
void throwParameterWrongType() const
virtual bool exists_(ParameterSet const &pset, bool isTracked) const =0
static void printSpaces(std::ostream &os, int n)
void checkAndGetLabelsAndTypes_(std::set< std::string > &usedLabels, std::set< ParameterTypes > ¶meterTypes, std::set< ParameterTypes > &wildcardTypes) const override
bool exists(ParameterSet const &pset) const
ParameterTypes type() const
void validate_(ParameterSet &pset, std::set< std::string > &validatedLabels, bool optional) const override
bool hasNestedContent() const
virtual void insertDefault_(ParameterSet &pset) const =0
void throwParameterWrongTrackiness() const
ParameterDescriptionBase(std::string const &iLabel, ParameterTypes iType, bool isTracked, bool hasDefault, Comment const &iComment)
virtual void writeDoc_(std::ostream &os, int indentation) const =0
std::string const & label() const