diff options
author | 2011-04-07 14:15:31 +0100 | |
---|---|---|
committer | 2011-04-07 14:15:31 +0100 | |
commit | 5bca2928c8047c1d34e35d8c167a7a6644b2515a (patch) | |
tree | f89de8dc9aac885067abea62dc1f5e8fcb04eea9 /doc | |
parent | 4eb9754117cf6d1fe9985fc1950ffbaf943fcafc (diff) | |
download | paludis-5bca2928c8047c1d34e35d8c167a7a6644b2515a.tar.gz paludis-5bca2928c8047c1d34e35d8c167a7a6644b2515a.tar.xz |
Constraint -> Requirement
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cplusplus/examples/example_dep_spec.cc | 56 | ||||
-rw-r--r-- | doc/api/cplusplus/examples/example_match_package.cc | 2 | ||||
-rw-r--r-- | doc/api/cplusplus/examples/example_selection.cc | 8 |
3 files changed, 33 insertions, 33 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec.cc b/doc/api/cplusplus/examples/example_dep_spec.cc index ba0f64753..57fb2e545 100644 --- a/doc/api/cplusplus/examples/example_dep_spec.cc +++ b/doc/api/cplusplus/examples/example_dep_spec.cc @@ -59,35 +59,35 @@ int main(int argc, char * argv[]) /* Display information about the PackageDepSpec. */ cout << "Information about '" << spec << "':" << endl; - if (spec.package_name_constraint()) - cout << " " << left << setw(24) << "Package:" << " " << spec.package_name_constraint()->name() << endl; + if (spec.package_name_requirement()) + cout << " " << left << setw(24) << "Package:" << " " << spec.package_name_requirement()->name() << endl; - if (spec.category_name_part_constraint()) - cout << " " << left << setw(24) << "Category part:" << " " << spec.category_name_part_constraint()->name_part() << endl; + if (spec.category_name_part_requirement()) + cout << " " << left << setw(24) << "Category part:" << " " << spec.category_name_part_requirement()->name_part() << endl; - if (spec.package_name_part_constraint()) - cout << " " << left << setw(24) << "Package part:" << " " << spec.package_name_part_constraint()->name_part() << endl; + if (spec.package_name_part_requirement()) + cout << " " << left << setw(24) << "Package part:" << " " << spec.package_name_part_requirement()->name_part() << endl; - if (spec.all_version_constraints() && ! spec.all_version_constraints()->empty()) + if (spec.all_version_requirements() && ! spec.all_version_requirements()->empty()) { cout << " " << left << setw(24) << "Version requirements:" << " "; bool need_join(false); - for (auto r(spec.all_version_constraints()->begin()), r_end(spec.all_version_constraints()->end()) ; + for (auto r(spec.all_version_requirements()->begin()), r_end(spec.all_version_requirements()->end()) ; r != r_end ; ++r) { if (need_join) { switch ((*r)->combiner()) { - case vcc_and: + case vrc_and: cout << " and "; break; - case vcc_or: + case vrc_or: cout << " or "; break; - case last_vcc: + case last_vrc: throw InternalError(PALUDIS_HERE, "Bad version_requirements_mode"); } } @@ -98,36 +98,36 @@ int main(int argc, char * argv[]) cout << endl; } - if (spec.exact_slot_constraint()) - cout << " " << left << setw(24) << "Slot:" << " " << spec.exact_slot_constraint()->name() << endl; + if (spec.exact_slot_requirement()) + cout << " " << left << setw(24) << "Slot:" << " " << spec.exact_slot_requirement()->name() << endl; - if (spec.in_repository_constraint()) + if (spec.in_repository_requirement()) cout << " " << left << setw(24) << "In repository:" << " " << - spec.in_repository_constraint()->name() << endl; + spec.in_repository_requirement()->name() << endl; - if (spec.from_repository_constraint()) + if (spec.from_repository_requirement()) cout << " " << left << setw(24) << "From repository:" << " " << - spec.from_repository_constraint()->name() << endl; + spec.from_repository_requirement()->name() << endl; - if (spec.installed_at_path_constraint()) + if (spec.installed_at_path_requirement()) cout << " " << left << setw(24) << "Installed at path:" << " " << - spec.installed_at_path_constraint()->path() << endl; + spec.installed_at_path_requirement()->path() << endl; - if (spec.installable_to_path_constraint()) + if (spec.installable_to_path_requirement()) cout << " " << left << setw(24) << "Installable to path:" << " " << - spec.installable_to_path_constraint()->path() << ", " << - spec.installable_to_path_constraint()->include_masked() << endl; + spec.installable_to_path_requirement()->path() << ", " << + spec.installable_to_path_requirement()->include_masked() << endl; - if (spec.installable_to_repository_constraint()) + if (spec.installable_to_repository_requirement()) cout << " " << left << setw(24) << "Installable to repository:" << " " << - spec.installable_to_repository_constraint()->name() << ", " << - spec.installable_to_repository_constraint()->include_masked() << endl; + spec.installable_to_repository_requirement()->name() << ", " << + spec.installable_to_repository_requirement()->include_masked() << endl; - if (spec.all_choice_constraints() && ! spec.all_choice_constraints()->empty()) + if (spec.all_choice_requirements() && ! spec.all_choice_requirements()->empty()) { - cout << " " << left << setw(24) << "Choice constraints:" << " "; + cout << " " << left << setw(24) << "Choice requirements:" << " "; bool need_join(false); - for (auto u(spec.all_choice_constraints()->begin()), u_end(spec.all_choice_constraints()->end()) ; u != u_end ; ++u) + for (auto u(spec.all_choice_requirements()->begin()), u_end(spec.all_choice_requirements()->end()) ; u != u_end ; ++u) { if (need_join) cout << " and "; diff --git a/doc/api/cplusplus/examples/example_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc index 0ff9e9f41..94abb4cfc 100644 --- a/doc/api/cplusplus/examples/example_match_package.cc +++ b/doc/api/cplusplus/examples/example_match_package.cc @@ -54,7 +54,7 @@ int main(int argc, char * argv[]) i != i_end ; ++i) { /* Is it paludis? */ - if (match_package(*env, MutablePackageDepSpecData({ }).constrain_package( + if (match_package(*env, MutablePackageDepSpecData({ }).require_package( QualifiedPackageName("sys-apps/paludis")), *i, make_null_shared_ptr(), { })) cout << left << setw(50) << (stringify(**i) + ":") << " " << "paludis" << endl; diff --git a/doc/api/cplusplus/examples/example_selection.cc b/doc/api/cplusplus/examples/example_selection.cc index 0242dbd10..f71a6ba0c 100644 --- a/doc/api/cplusplus/examples/example_selection.cc +++ b/doc/api/cplusplus/examples/example_selection.cc @@ -62,13 +62,13 @@ int main(int argc, char * argv[]) * object used determines the number and ordering of results. In the * simplest form, it takes a Generator as a parameter. */ show_selection(env, selection::AllVersionsSorted( - generator::Matches(MutablePackageDepSpecData({ }).constrain_package( + generator::Matches(MutablePackageDepSpecData({ }).require_package( QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }))); /* Generators can be passed through a Filter. The Selection optimises * the code internally to avoid doing excess work. */ show_selection(env, selection::AllVersionsSorted( - generator::Matches(MutablePackageDepSpecData({ }).constrain_package( + generator::Matches(MutablePackageDepSpecData({ }).require_package( QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) | filter::InstalledAtSlash())); @@ -76,7 +76,7 @@ int main(int argc, char * argv[]) * with filter::SupportsAction<InstallAction>, since installed packages * aren't masked. */ show_selection(env, selection::AllVersionsSorted( - generator::Matches(MutablePackageDepSpecData({ }).constrain_package( + generator::Matches(MutablePackageDepSpecData({ }).require_package( QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) | filter::SupportsAction<InstallAction>() | filter::NotMasked())); @@ -85,7 +85,7 @@ int main(int argc, char * argv[]) * is no metadata cache. Consider using other Selection objects if * you only need the best matching or some arbitrary matching ID. */ show_selection(env, selection::BestVersionOnly( - generator::Matches(MutablePackageDepSpecData({ }).constrain_package( + generator::Matches(MutablePackageDepSpecData({ }).require_package( QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) | filter::SupportsAction<InstallAction>() | filter::NotMasked())); |