aboutsummaryrefslogtreecommitdiff
path: root/paludis/dep_spec.hh
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/dep_spec.hh')
-rw-r--r--paludis/dep_spec.hh52
1 files changed, 33 insertions, 19 deletions
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 46672f940..3e802c75a 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -236,29 +236,11 @@ namespace paludis
class PALUDIS_VISIBLE StringDepSpec :
public DepSpec
{
- private:
- std::string _str;
-
- protected:
- ///\name Basic operations
- ///\{
-
- StringDepSpec(const std::string &);
-
- ~StringDepSpec();
-
- ///\}
-
- /**
- * Change our text.
- */
- void set_text(const std::string &);
-
public:
/**
* Fetch our text.
*/
- std::string text() const;
+ virtual const std::string text() const = 0;
};
/**
@@ -312,6 +294,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
/**
* Fetch the single NameRequirement, if we have one, or
* a null pointer otherwise.
@@ -428,6 +412,9 @@ namespace paludis
class PALUDIS_VISIBLE PlainTextDepSpec :
public StringDepSpec
{
+ private:
+ std::string _text;
+
public:
///\name Basic operations
///\{
@@ -436,6 +423,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
virtual std::shared_ptr<DepSpec> clone() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
@@ -459,6 +448,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
/// Fetch the name of our set.
const SetName name() const PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -475,6 +466,9 @@ namespace paludis
class PALUDIS_VISIBLE LicenseDepSpec :
public StringDepSpec
{
+ private:
+ std::string _text;
+
public:
///\name Basic operations
///\{
@@ -483,6 +477,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
virtual std::shared_ptr<DepSpec> clone() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
@@ -500,6 +496,9 @@ namespace paludis
class PALUDIS_VISIBLE FetchableURIDepSpec :
public StringDepSpec
{
+ private:
+ std::string _text;
+
public:
///\name Basic operations
///\{
@@ -508,6 +507,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
/**
* The original URL (that is, the text to the left of the arrow, if present,
* or the entire text otherwise).
@@ -541,6 +542,9 @@ namespace paludis
class PALUDIS_VISIBLE SimpleURIDepSpec :
public StringDepSpec
{
+ private:
+ std::string _text;
+
public:
///\name Basic operations
///\{
@@ -549,6 +553,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
virtual std::shared_ptr<DepSpec> clone() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
@@ -583,6 +589,7 @@ namespace paludis
public StringDepSpec
{
private:
+ std::string _text;
PackageDepSpec _spec;
public:
@@ -595,6 +602,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
/**
* Fetch the spec we're blocking.
*
@@ -651,6 +660,9 @@ namespace paludis
class PALUDIS_VISIBLE PlainTextLabelDepSpec :
public StringDepSpec
{
+ private:
+ std::string _text;
+
public:
///\name Basic operations
///\{
@@ -660,6 +672,8 @@ namespace paludis
///\}
+ virtual const std::string text() const;
+
virtual std::shared_ptr<DepSpec> clone() const PALUDIS_ATTRIBUTE((warn_unused_result));
const std::string label() const PALUDIS_ATTRIBUTE((warn_unused_result));