- Properly combines _id_ranges and _uuid_list from multiple arguments.
- Properly inserts an 'or' OP between the id and uuid sections.
- Removed mistaken OP tag from 'id' and 'uuid' attributes.
This commit is contained in:
Paul Beckingham 2014-10-25 18:45:03 -04:00
parent 08634a8bb5
commit 861743c37d

View file

@ -1131,8 +1131,12 @@ void CLI::findUUIDs ()
if (n.depleted ())
{
_uuid_list = uuidList;
a->tag ("UUID");
// Save the list.
std::vector <std::string>::iterator u;
for (u = uuidList.begin (); u != uuidList.end (); ++u)
_uuid_list.push_back (*u);
}
}
}
@ -1173,6 +1177,7 @@ void CLI::insertIDExpr ()
// or ( uuid = $UUID )
// )
// Building block operators.
A openParen ("argSeq", "("); openParen.tag ("FILTER"); openParen.tag ("OP");
A closeParen ("argSeq", ")"); closeParen.tag ("FILTER"); closeParen.tag ("OP");
A opOr ("argSeq", "or"); opOr.tag ("FILTER"); opOr.tag ("OP");
@ -1182,15 +1187,14 @@ void CLI::insertIDExpr ()
A opGTE ("argSeq", ">="); opGTE.tag ("FILTER"); opGTE.tag ("OP");
A opLTE ("argSeq", "<="); opLTE.tag ("FILTER"); opLTE.tag ("OP");
// Building block attributes.
A argID ("argSeq", "id");
argID.tag ("FILTER");
argID.tag ("ATTRIBUTE");
argID.tag ("OP");
A argUUID ("argSeq", "uuid");
argUUID.tag ("FILTER");
argUUID.tag ("ATTRIBUTE");
argUUID.tag ("OP");
reconstructed.push_back (openParen);
@ -1241,6 +1245,11 @@ void CLI::insertIDExpr ()
}
}
// Combine the ID and UUID sections wiþh 'or'.
if (_id_ranges.size () &&
_uuid_list.size ())
reconstructed.push_back (opOr);
// Add all UUID list items.
std::vector <std::string>::iterator u;
for (u = _uuid_list.begin (); u != _uuid_list.end (); ++u)