diff options
author | 2011-04-05 17:24:42 +0100 | |
---|---|---|
committer | 2011-04-05 19:06:04 +0100 | |
commit | 0a0afc97925e6c8df3cedd5a4c3dee60a9673785 (patch) | |
tree | ebfa071857b3aacd7a4db5dc9bd25c421f505088 /doc | |
parent | 975c0c94b62ff647c8aceab9c4ff62ca4e47142e (diff) | |
download | paludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.gz paludis-0a0afc97925e6c8df3cedd5a4c3dee60a9673785.tar.xz |
No need for fancy PackageDepSpecData subclassing
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cplusplus/examples/example_match_package.cc | 2 | ||||
-rw-r--r-- | doc/api/cplusplus/examples/example_selection.cc | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/api/cplusplus/examples/example_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc index c308f8dcd..0ff9e9f41 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, make_package_dep_spec({ }).package( + if (match_package(*env, MutablePackageDepSpecData({ }).constrain_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 ad60e36b0..0242dbd10 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(make_package_dep_spec({ }).package( + generator::Matches(MutablePackageDepSpecData({ }).constrain_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(make_package_dep_spec({ }).package( + generator::Matches(MutablePackageDepSpecData({ }).constrain_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(make_package_dep_spec({ }).package( + generator::Matches(MutablePackageDepSpecData({ }).constrain_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(make_package_dep_spec({ }).package( + generator::Matches(MutablePackageDepSpecData({ }).constrain_package( QualifiedPackageName("sys-apps/paludis")), make_null_shared_ptr(), { }) | filter::SupportsAction<InstallAction>() | filter::NotMasked())); |