aboutsummaryrefslogtreecommitdiff
path: root/paludis/user_dep_spec.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-23 22:51:02 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-02-23 22:51:02 +0000
commitc0220371b5b821fb2a01aaa983046d0a330fe0b9 (patch)
tree7f516959a80c84a72d2b35f7ee2f98d80b73c1d7 /paludis/user_dep_spec.hh
parent4993721605cc141b0d4eaeacdfc139bc95cbde74 (diff)
downloadpaludis-c0220371b5b821fb2a01aaa983046d0a330fe0b9.tar.gz
paludis-c0220371b5b821fb2a01aaa983046d0a330fe0b9.tar.xz
[.key=value] user specs
Diffstat (limited to 'paludis/user_dep_spec.hh')
-rw-r--r--paludis/user_dep_spec.hh31
1 files changed, 30 insertions, 1 deletions
diff --git a/paludis/user_dep_spec.hh b/paludis/user_dep_spec.hh
index 6af3b85d6..4433a5f4b 100644
--- a/paludis/user_dep_spec.hh
+++ b/paludis/user_dep_spec.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -24,6 +24,7 @@
#include <paludis/dep_spec.hh>
#include <paludis/slot_requirement.hh>
#include <paludis/filter.hh>
+#include <paludis/util/private_implementation_pattern.hh>
namespace paludis
{
@@ -56,6 +57,34 @@ namespace paludis
virtual const SlotName slot() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
+
+ /**
+ * A key requirement for a user PackageDepSpec.
+ *
+ * \since 0.36
+ * \ingroup g_dep_spec
+ */
+ class PALUDIS_VISIBLE UserKeyRequirement :
+ public AdditionalPackageDepSpecRequirement,
+ private PrivateImplementationPattern<UserKeyRequirement>
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ UserKeyRequirement(const std::string &);
+ ~UserKeyRequirement();
+
+ ///\}
+
+ virtual bool requirement_met(const Environment * const, const PackageID &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const std::string as_human_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const std::string as_raw_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+
+#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
+ extern template class PrivateImplementationPattern<UserKeyRequirement>;
+#endif
}
#endif