aboutsummaryrefslogtreecommitdiff
path: root/paludis/user_dep_spec.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-01 20:57:52 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-04 08:32:59 +0100
commitf243a4014b98275a3ebb7872faadab5ba1fcafa8 (patch)
tree83724be5fe7feb82875e82a8cf4707d1e85cc929 /paludis/user_dep_spec.hh
parentf0df32fb13ae4f2d9e78fa914a374da252a3ee52 (diff)
downloadpaludis-f243a4014b98275a3ebb7872faadab5ba1fcafa8.tar.gz
paludis-f243a4014b98275a3ebb7872faadab5ba1fcafa8.tar.xz
key requirements to constraints
Diffstat (limited to 'paludis/user_dep_spec.hh')
-rw-r--r--paludis/user_dep_spec.hh46
1 files changed, 8 insertions, 38 deletions
diff --git a/paludis/user_dep_spec.hh b/paludis/user_dep_spec.hh
index 656791100..0398c5ef9 100644
--- a/paludis/user_dep_spec.hh
+++ b/paludis/user_dep_spec.hh
@@ -23,9 +23,12 @@
#include <paludis/user_dep_spec-fwd.hh>
#include <paludis/dep_spec.hh>
#include <paludis/filter.hh>
-#include <paludis/additional_package_dep_spec_requirement.hh>
+#include <paludis/package_dep_spec_constraint-fwd.hh>
+
#include <paludis/util/pimp.hh>
+#include <tuple>
+
namespace paludis
{
/**
@@ -53,46 +56,13 @@ namespace paludis
const std::string &) PALUDIS_VISIBLE;
/**
- * A key requirement for a user PackageDepSpec.
+ * Split up a [.key=value] into its component parts.
*
- * \since 0.36
* \ingroup g_dep_spec
+ * \since 0.61
*/
- class PALUDIS_VISIBLE UserKeyRequirement :
- public AdditionalPackageDepSpecRequirement
- {
- private:
- Pimp<UserKeyRequirement> _imp;
-
- public:
- ///\name Basic operations
- ///\{
-
- UserKeyRequirement(const std::string &);
- ~UserKeyRequirement();
-
- ///\}
-
- virtual const std::pair<bool, std::string> requirement_met(
- const Environment * const, const ChangedChoices *,
- const std::shared_ptr<const PackageID> &,
- const std::shared_ptr<const PackageID> &,
- const ChangedChoices * const) const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual const std::string as_human_string(
- const std::shared_ptr<const PackageID> &) const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual const std::string as_raw_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual Tribool accumulate_changes_to_make_met(
- const Environment * const,
- const ChangedChoices * const,
- const std::shared_ptr<const PackageID> &,
- const std::shared_ptr<const PackageID> &,
- ChangedChoices &) const PALUDIS_ATTRIBUTE((warn_unused_result));
- };
-
- extern template class Pimp<UserKeyRequirement>;
+ std::tuple<std::string, KeyConstraintOperation, std::string> parse_user_key_constraint(
+ const std::string &) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result));
}
#endif