aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-08-06 14:32:49 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2012-08-07 14:51:14 +0100
commit88d04174e2d8a94e95477b55749f130011d2d288 (patch)
treee4e3c72f204a19349579490853ad48c3889f9b7a
parent89957e6130d475fcc1eeb250021a0752c779b7be (diff)
downloadpaludis-88d04174e2d8a94e95477b55749f130011d2d288.tar.gz
paludis-88d04174e2d8a94e95477b55749f130011d2d288.tar.xz
EChoiceValue::needs_explicit_match
-rw-r--r--paludis/choice.hh5
-rw-r--r--paludis/elike_choices.cc42
-rw-r--r--paludis/elike_choices.hh7
-rw-r--r--paludis/repositories/e/e_choice_value.cc7
-rw-r--r--paludis/repositories/fake/fake_package_id.cc5
5 files changed, 66 insertions, 0 deletions
diff --git a/paludis/choice.hh b/paludis/choice.hh
index 0f24664..16fd1c7 100644
--- a/paludis/choice.hh
+++ b/paludis/choice.hh
@@ -357,6 +357,11 @@ namespace paludis
virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
/**
+ * Does this flag have to be explicitly accepted when doing matching?
+ */
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
+
+ /**
* Is this flag locked (forced or masked)?
*/
virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
diff --git a/paludis/elike_choices.cc b/paludis/elike_choices.cc
index e994655..6196ef6 100644
--- a/paludis/elike_choices.cc
+++ b/paludis/elike_choices.cc
@@ -182,6 +182,12 @@ ELikeOptionalTestsChoiceValue::permitted_parameter_values() const
return make_null_shared_ptr();
}
+bool
+ELikeOptionalTestsChoiceValue::presumed() const
+{
+ return false;
+}
+
const UnprefixedChoiceName
ELikeRecommendedTestsChoiceValue::canonical_unprefixed_name()
{
@@ -256,6 +262,12 @@ ELikeRecommendedTestsChoiceValue::permitted_parameter_values() const
return make_null_shared_ptr();
}
+bool
+ELikeRecommendedTestsChoiceValue::presumed() const
+{
+ return false;
+}
+
const ChoicePrefixName
paludis::canonical_build_options_prefix()
{
@@ -348,6 +360,12 @@ ELikeExpensiveTestsChoiceValue::permitted_parameter_values() const
return make_null_shared_ptr();
}
+bool
+ELikeExpensiveTestsChoiceValue::presumed() const
+{
+ return false;
+}
+
const UnprefixedChoiceName
ELikeJobsChoiceValue::canonical_unprefixed_name()
{
@@ -443,6 +461,12 @@ ELikeJobsChoiceValue::permitted_parameter_values() const
return CommonValues::get_instance()->permitted_jobs_values;
}
+bool
+ELikeJobsChoiceValue::presumed() const
+{
+ return false;
+}
+
const UnprefixedChoiceName
ELikeTraceChoiceValue::canonical_unprefixed_name()
{
@@ -516,6 +540,12 @@ ELikeTraceChoiceValue::permitted_parameter_values() const
return make_null_shared_ptr();
}
+bool
+ELikeTraceChoiceValue::presumed() const
+{
+ return false;
+}
+
namespace
{
ELikeSymbolsChoiceValueParameter get_symbols(const std::shared_ptr<const PackageID> & id,
@@ -599,6 +629,12 @@ ELikeSymbolsChoiceValue::permitted_parameter_values() const
return CommonValues::get_instance()->permitted_symbols_values;
}
+bool
+ELikeSymbolsChoiceValue::presumed() const
+{
+ return false;
+}
+
const UnprefixedChoiceName
ELikeSymbolsChoiceValue::canonical_unprefixed_name()
{
@@ -754,6 +790,12 @@ ELikeWorkChoiceValue::permitted_parameter_values() const
return CommonValues::get_instance()->permitted_work_values;
}
+bool
+ELikeWorkChoiceValue::presumed() const
+{
+ return false;
+}
+
const UnprefixedChoiceName
ELikeWorkChoiceValue::canonical_unprefixed_name()
{
diff --git a/paludis/elike_choices.hh b/paludis/elike_choices.hh
index 950804b..60a237a 100644
--- a/paludis/elike_choices.hh
+++ b/paludis/elike_choices.hh
@@ -51,6 +51,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -78,6 +79,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -105,6 +107,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -131,6 +134,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -156,6 +160,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -183,6 +188,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -214,6 +220,7 @@ namespace paludis
virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/e/e_choice_value.cc b/paludis/repositories/e/e_choice_value.cc
index 4e67916..8252b34 100644
--- a/paludis/repositories/e/e_choice_value.cc
+++ b/paludis/repositories/e/e_choice_value.cc
@@ -47,6 +47,7 @@ namespace
ChoiceOrigin origin() const;
const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
}
@@ -109,6 +110,12 @@ EChoiceValue::permitted_parameter_values() const
return make_null_shared_ptr();
}
+bool
+EChoiceValue::presumed() const
+{
+ return false;
+}
+
namespace paludis
{
template <>
diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc
index 37d0c58..6cf0012 100644
--- a/paludis/repositories/fake/fake_package_id.cc
+++ b/paludis/repositories/fake/fake_package_id.cc
@@ -471,6 +471,11 @@ namespace
{
return make_null_shared_ptr();
}
+
+ virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result))
+ {
+ return false;
+ }
};
}