aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/examples/example_dep_spec_flattener.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_dep_spec_flattener.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_dep_spec_flattener.cc')
-rw-r--r--doc/api/cplusplus/examples/example_dep_spec_flattener.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
index 52eb8b22c..9d3f73abe 100644
--- a/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
+++ b/doc/api/cplusplus/examples/example_dep_spec_flattener.cc
@@ -42,10 +42,8 @@ int main(int argc, char * argv[])
CommandLine::get_instance()->a_environment.argument()));
/* Fetch package IDs for 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>())]);
/* For each ID: */
for (PackageIDSequence::ConstIterator i(ids->begin()), i_end(ids->end()) ;