15 : node_left_(node_left.
clone()), node_right_(node_right.
clone()) {}
19 : node_left_(
std::
move(node_left)), node_right_(node_right.
clone()) {}
22 std::unique_ptr<ParameterDescriptionNode> node_right)
23 : node_left_(node_left.
clone()), node_right_(
std::
move(node_right)) {}
26 std::unique_ptr<ParameterDescriptionNode> node_right)
27 : node_left_(
std::
move(node_left)), node_right_(
std::
move(node_right)) {}
30 std::set<ParameterTypes>& parameterTypes,
31 std::set<ParameterTypes>& wildcardTypes)
const {
32 std::set<std::string> labelsLeft;
33 std::set<ParameterTypes> parameterTypesLeft;
34 std::set<ParameterTypes> wildcardTypesLeft;
35 node_left_->checkAndGetLabelsAndTypes(labelsLeft, parameterTypesLeft, wildcardTypesLeft);
37 std::set<std::string> labelsRight;
38 std::set<ParameterTypes> parameterTypesRight;
39 std::set<ParameterTypes> wildcardTypesRight;
40 node_right_->checkAndGetLabelsAndTypes(labelsRight, parameterTypesRight, wildcardTypesRight);
46 usedLabels.insert(labelsLeft.begin(), labelsLeft.end());
47 usedLabels.insert(labelsRight.begin(), labelsRight.end());
49 parameterTypes.insert(parameterTypesRight.begin(), parameterTypesRight.end());
50 parameterTypes.insert(parameterTypesLeft.begin(), parameterTypesLeft.end());
52 wildcardTypes.insert(wildcardTypesRight.begin(), wildcardTypesRight.end());
53 wildcardTypes.insert(wildcardTypesLeft.begin(), wildcardTypesLeft.end());
64 std::ostream& os,
bool optional,
bool& startWithComma,
int indentation,
bool& wroteSomething)
const {
77 if (dfh.
pass() == 1) {
86 os <<
" (do not write to cfi)";
88 os <<
" see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
98 os <<
" (do not write to cfi)";
104 os <<
"see Section " << dfh.
section() <<
"." << dfh.
counter() <<
"\n";
117 node_left_->printNestedContent(os,
false, dfh);
127 std::stringstream
ss;
132 os <<
"Section " << newSection <<
" AND group description:\n";
135 os <<
"This optional AND group requires all or none of the following to be in the PSet\n";
137 os <<
"This AND group requires all of the following to be in the PSet\n";
160 node_left_->printNestedContent(os,
false, new_dfh);
161 node_right_->printNestedContent(os,
false, new_dfh);
175 std::set<std::string>
const& labelsRight)
const {
176 std::set<std::string> duplicateLabels;
177 std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin());
178 std::set_intersection(labelsLeft.begin(), labelsLeft.end(), labelsRight.begin(), labelsRight.end(), insertIter);
179 if (!duplicateLabels.empty()) {
180 std::stringstream
ss;
181 for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(), iEnd = duplicateLabels.end();
184 ss <<
" \"" << *iter <<
"\"\n";
187 <<
"\"and\" expression must be unique. The following duplicate\n"
188 <<
"labels were detected:\n"
194 std::set<ParameterTypes>
const& types2)
const {
195 if (!types1.empty()) {
196 std::set<ParameterTypes> duplicateTypes;
197 std::insert_iterator<std::set<ParameterTypes> > insertIter(duplicateTypes, duplicateTypes.begin());
198 std::set_intersection(types1.begin(), types1.end(), types2.begin(), types2.end(), insertIter);
199 if (!duplicateTypes.empty()) {
200 std::stringstream
ss;
201 for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes.begin(), iEnd = duplicateTypes.end();
207 <<
"Types used for wildcards in different nodes of a ParameterSetDescription\n"
208 <<
"\"and\" expression must be different from types used for other parameters.\n"
209 <<
"The following duplicate types were detected:\n"