aboutsummaryrefslogtreecommitdiff
path: root/paludis/user_dep_spec.hh
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 14:20:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-05-19 20:52:24 +0100
commite52571861104efe6139b78b22557211f08025f11 (patch)
tree634bec98491886d12f8f5a25b24f4cacf8d69de5 /paludis/user_dep_spec.hh
parent80bf4ad14bfd8ab74a9c0d5f203ad5a370351def (diff)
downloadpaludis-e52571861104efe6139b78b22557211f08025f11.tar.gz
paludis-e52571861104efe6139b78b22557211f08025f11.tar.xz
Revert the package dep spec changes
Diffstat (limited to 'paludis/user_dep_spec.hh')
-rw-r--r--paludis/user_dep_spec.hh65
1 files changed, 57 insertions, 8 deletions
diff --git a/paludis/user_dep_spec.hh b/paludis/user_dep_spec.hh
index aacacddc2..d42684504 100644
--- a/paludis/user_dep_spec.hh
+++ b/paludis/user_dep_spec.hh
@@ -22,13 +22,11 @@
#include <paludis/user_dep_spec-fwd.hh>
#include <paludis/dep_spec.hh>
+#include <paludis/slot_requirement.hh>
#include <paludis/filter.hh>
-#include <paludis/package_dep_spec_requirement-fwd.hh>
-
+#include <paludis/additional_package_dep_spec_requirement.hh>
#include <paludis/util/pimp.hh>
-#include <tuple>
-
namespace paludis
{
/**
@@ -55,14 +53,65 @@ namespace paludis
PackageDepSpec envless_parse_package_dep_spec_for_tests(
const std::string &) PALUDIS_VISIBLE;
+ class PALUDIS_VISIBLE UserSlotExactRequirement :
+ public SlotExactRequirement
+ {
+ private:
+ const SlotName _s;
+
+ public:
+ ///\name Basic operations
+ ///\{
+
+ UserSlotExactRequirement(const SlotName &);
+
+ ///\}
+
+ virtual const SlotName slot() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual const std::string as_string() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+
/**
- * Split up a [.key=value] into its component parts.
+ * A key requirement for a user PackageDepSpec.
*
+ * \since 0.36
* \ingroup g_dep_spec
- * \since 0.61
*/
- std::tuple<KeyRequirementKeyType, std::string, KeyRequirementOperation, std::string> parse_user_key_requirement(
- const std::string &) PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((warn_unused_result));
+ 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>;
}
#endif