aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_spec.hh
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/version_spec.hh')
-rw-r--r--paludis/version_spec.hh21
1 files changed, 18 insertions, 3 deletions
diff --git a/paludis/version_spec.hh b/paludis/version_spec.hh
index 91e673f..1aab313 100644
--- a/paludis/version_spec.hh
+++ b/paludis/version_spec.hh
@@ -56,9 +56,10 @@ namespace paludis
*
* \ingroup grpversions
*/
- class VersionSpec : private PrivateImplementationPattern<VersionSpec>,
- public ComparisonPolicy<VersionSpec, comparison_mode::FullComparisonTag,
- comparison_method::CompareByMemberComparisonFunctionTag>
+ class VersionSpec :
+ private PrivateImplementationPattern<VersionSpec>,
+ public ComparisonPolicy<VersionSpec, comparison_mode::FullComparisonTag,
+ comparison_method::CompareByMemberComparisonFunctionTag>
{
friend std::ostream & operator<< (std::ostream &, const VersionSpec &);
@@ -95,6 +96,11 @@ namespace paludis
bool tilde_compare(const VersionSpec & other) const;
/**
+ * Comparison function for ~> depend operator (gems).
+ */
+ bool tilde_greater_compare(const VersionSpec & other) const;
+
+ /**
* Comparison function for =* depend operator.
*/
bool equal_star_compare(const VersionSpec & other) const;
@@ -116,6 +122,15 @@ namespace paludis
std::string revision_only() const;
/**
+ * Bump ourself.
+ *
+ * This is used by the ~> operator. It returns a version where the
+ * next to last number is one greater (e.g. 5.3.1 => 5.4). Any non
+ * number parts are stripped (e.g. 1.2.3_alpha4-r5 => 1.3).
+ */
+ VersionSpec bump() const;
+
+ /**
* Are we an -scm package, or something pretending to be one?
*/
bool is_scm() const;