aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/examples/example_match_package.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-01 13:51:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-06-01 13:51:46 +0000
commit87294dc0c47918934ac032e9a080e8cf386f9bf2 (patch)
tree36dc289aa22200601ec28f2d7b497cd078e34ab6 /doc/api/cplusplus/examples/example_match_package.cc
parent3b9f4ed10c9eb6901f33c7037989f3b67eb5de07 (diff)
downloadpaludis-87294dc0c47918934ac032e9a080e8cf386f9bf2.tar.gz
paludis-87294dc0c47918934ac032e9a080e8cf386f9bf2.tar.xz
New Selection + Filter + Generator interface using Environment, replacing the old PackageDatabase Query. Fixes: ticket:559
Diffstat (limited to 'doc/api/cplusplus/examples/example_match_package.cc')
-rw-r--r--doc/api/cplusplus/examples/example_match_package.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/api/cplusplus/examples/example_match_package.cc b/doc/api/cplusplus/examples/example_match_package.cc
index 09266ba8d..7cd7b0650 100644
--- a/doc/api/cplusplus/examples/example_match_package.cc
+++ b/doc/api/cplusplus/examples/example_match_package.cc
@@ -40,9 +40,8 @@ int main(int argc, char * argv[])
CommandLine::get_instance()->a_environment.argument()));
/* Fetch all installed packages. */
- std::tr1::shared_ptr<const PackageIDSequence> ids(env->package_database()->query(
- query::SupportsAction<InstalledAction>(),
- qo_order_by_version));
+ std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::AllVersionsSorted(
+ generator::All() | filter::SupportsAction<InstalledAction>())]);
/* Fetch the 'system' and 'world' sets. Ordinarily we should check for
* zero pointers here, but these two sets will always exist. */