13 : node_left_(node_left.
clone()), node_right_(node_right.
clone()) {}
17 : node_left_(
std::
move(node_left)), node_right_(node_right.
clone()) {}
20 std::unique_ptr<ParameterDescriptionNode> node_right)
21 : node_left_(node_left.
clone()), node_right_(
std::
move(node_right)) {}
24 std::unique_ptr<ParameterDescriptionNode> node_right)
25 : node_left_(
std::
move(node_left)), node_right_(
std::
move(node_right)) {}
28 std::set<ParameterTypes>& parameterTypes,
29 std::set<ParameterTypes>& wildcardTypes)
const {
30 std::set<std::string> labelsLeft;
31 std::set<ParameterTypes> parameterTypesLeft;
32 std::set<ParameterTypes> wildcardTypesLeft;
33 node_left_->checkAndGetLabelsAndTypes(labelsLeft, parameterTypesLeft, wildcardTypesLeft);
35 std::set<std::string> labelsRight;
36 std::set<ParameterTypes> parameterTypesRight;
37 std::set<ParameterTypes> wildcardTypesRight;
38 node_right_->checkAndGetLabelsAndTypes(labelsRight, parameterTypesRight, wildcardTypesRight);
40 usedLabels.insert(labelsLeft.begin(), labelsLeft.end());
41 usedLabels.insert(labelsRight.begin(), labelsRight.end());
43 parameterTypes.insert(parameterTypesRight.begin(), parameterTypesRight.end());
44 parameterTypes.insert(parameterTypesLeft.begin(), parameterTypesLeft.end());
46 wildcardTypes.insert(wildcardTypesRight.begin(), wildcardTypesRight.end());
47 wildcardTypes.insert(wildcardTypesLeft.begin(), wildcardTypesLeft.end());
53 int nTotal = nExistLeft + nExistRight;
62 if (nExistLeft == 1) {
64 }
else if (nExistRight == 1) {
66 }
else if (nTotal == 0) {
73 nTotal = nExistLeft + nExistRight;
82 std::ostream& os,
bool optional,
bool& startWithComma,
int indentation,
bool& wroteSomething)
const {
94 if (dfh.
pass() == 1) {
103 os <<
" (do not write to cfi)";
105 os <<
" see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
115 os <<
" (do not write to cfi)";
121 os <<
"see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
134 node_left_->printNestedContent(os,
false, dfh);
144 std::stringstream
ss;
149 os <<
"Section " << newSection <<
" XOR group description:\n";
152 os <<
"This optional XOR group requires exactly one or none of the following to be in the PSet\n";
154 os <<
"This XOR group requires exactly one of the following to be in the PSet\n";
177 node_left_->printNestedContent(os,
false, new_dfh);
178 node_right_->printNestedContent(os,
false, new_dfh);
197 <<
"Exactly one parameter can exist in a ParameterSet from a list of\n"
198 <<
"parameters described by an \"xor\" operator in a ParameterSetDescription.\n"
199 <<
"This rule also applies in a more general sense to the other types\n"
200 <<
"of nodes that can appear within a ParameterSetDescription. Only one\n"
201 <<
"can pass validation as \"existing\".\n";
209 <<
"Exactly one parameter can exist in a ParameterSet from a list of\n"
210 <<
"parameters described by an \"xor\" operator in a ParameterSetDescription.\n"
211 <<
"This rule also applies in a more general sense to the other types\n"
212 <<
"of nodes that can appear within a ParameterSetDescription. Only one\n"
213 <<
"can pass validation as \"existing\". This error has occurred after an\n"
214 <<
"attempt to insert missing parameters to fix the problem.\n";