aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/examples/example_environment.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-24 09:32:40 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-24 09:32:40 +0100
commit7cd0c2d122a5b38c5a925dac52b429c99e7f5085 (patch)
tree3263a593a314a0f91c8d14005b61a8a134325ae1 /doc/api/cplusplus/examples/example_environment.cc
parent95de300935276509248c6ad2f6a08bf458ef290c (diff)
downloadpaludis-7cd0c2d122a5b38c5a925dac52b429c99e7f5085.tar.gz
paludis-7cd0c2d122a5b38c5a925dac52b429c99e7f5085.tar.xz
Paludis is about choices.
Diffstat (limited to 'doc/api/cplusplus/examples/example_environment.cc')
-rw-r--r--doc/api/cplusplus/examples/example_environment.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/doc/api/cplusplus/examples/example_environment.cc b/doc/api/cplusplus/examples/example_environment.cc
index 966c53643..3513c2735 100644
--- a/doc/api/cplusplus/examples/example_environment.cc
+++ b/doc/api/cplusplus/examples/example_environment.cc
@@ -51,10 +51,9 @@ int main(int argc, char * argv[])
* called directly from clients. The system information and mirror
* functions are mostly for use by Repository subclasses. The []
* operator is covered in \ref example_selection.cc
- * "example_selection.cc". That leaves the package database, sets and
- * (currently, although this may well change in the future) use flag
- * queries. The package database has its own examples, so we'll start
- * with sets: */
+ * "example_selection.cc". That leaves the package database and sets.
+ * The package database has its own examples, so we'll start with sets:
+ * */
std::tr1::shared_ptr<SetSpecTree::ConstItem> world(env->set(SetName("world")));
if (world)
@@ -65,18 +64,6 @@ int main(int argc, char * argv[])
}
else
cout << "No world set defined" << endl;
-
- /* And use flags, for which we need a package IDs: */
- std::tr1::shared_ptr<const PackageIDSequence> ids((*env)[selection::BestVersionOnly(
- generator::Matches(make_package_dep_spec().package(QualifiedPackageName("sys-apps/paludis"))) |
- filter::SupportsAction<InstalledAction>())]);
-
- if (! ids->empty())
- {
- UseFlagName u("ruby");
- cout << "Use flag '" << u << "' for ID '" << **ids->rbegin() << "' is "
- << (env->query_use(u, **ids->rbegin()) ? "enabled" : "disabled") << endl;
- }
}
catch (const Exception & e)
{