diff options
author | 2011-04-02 15:14:21 +0100 | |
---|---|---|
committer | 2011-04-04 08:32:59 +0100 | |
commit | 1a8319191a0c4a585fab173199a2c898c76f30c3 (patch) | |
tree | 39ae0ee349e25f0b420fbd72cc43bd4ba3007d8d /doc | |
parent | f243a4014b98275a3ebb7872faadab5ba1fcafa8 (diff) | |
download | paludis-1a8319191a0c4a585fab173199a2c898c76f30c3.tar.gz paludis-1a8319191a0c4a585fab173199a2c898c76f30c3.tar.xz |
Version requirements to constraints
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cplusplus/examples/example_dep_spec.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc index 8b72b16df..1c386ab62 100644 --- a/doc/api/cplusplus/examples/example_dep_spec.cc +++ b/doc/api/cplusplus/examples/example_dep_spec.cc @@ -68,31 +68,31 @@ int main(int argc, char * argv[]) if (spec.package_name_part_constraint()) cout << " " << left << setw(24) << "Package part:" << " " << spec.package_name_part_constraint()->name_part() << endl; - if (spec.version_requirements_ptr() && ! spec.version_requirements_ptr()->empty()) + if (spec.all_version_constraints() && ! spec.all_version_constraints()->empty()) { cout << " " << left << setw(24) << "Version requirements:" << " "; bool need_join(false); - for (VersionRequirements::ConstIterator r(spec.version_requirements_ptr()->begin()), - r_end(spec.version_requirements_ptr()->end()) ; r != r_end ; ++r) + for (auto r(spec.all_version_constraints()->begin()), r_end(spec.all_version_constraints()->end()) ; + r != r_end ; ++r) { if (need_join) { - switch (spec.version_requirements_mode()) + switch ((*r)->combiner()) { - case vr_and: + case vcc_and: cout << " and "; break; - case vr_or: + case vcc_or: cout << " or "; break; - case last_vr: + case last_vcc: throw InternalError(PALUDIS_HERE, "Bad version_requirements_mode"); } } - cout << r->version_operator() << r->version_spec(); + cout << (*r)->version_operator() << (*r)->version_spec(); need_join = true; } cout << endl; |