aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-04 19:03:16 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-10-04 19:03:16 +0100
commit829bee9a7628e6eed13e7830ff0491bb68139a9e (patch)
tree07c30e7c13f28e307ca5464a58f5e4a51f3be423
parent5d106f1d0ce1b8c3a0ded3c2e443ead6dda4d471 (diff)
downloadpaludis-829bee9a7628e6eed13e7830ff0491bb68139a9e.tar.gz
paludis-829bee9a7628e6eed13e7830ff0491bb68139a9e.tar.xz
PartiallyMadePackageDepSpec::clear_*
-rw-r--r--paludis/partially_made_package_dep_spec.cc70
-rw-r--r--paludis/partially_made_package_dep_spec.hh70
2 files changed, 140 insertions, 0 deletions
diff --git a/paludis/partially_made_package_dep_spec.cc b/paludis/partially_made_package_dep_spec.cc
index 8e85177..6d13604 100644
--- a/paludis/partially_made_package_dep_spec.cc
+++ b/paludis/partially_made_package_dep_spec.cc
@@ -403,6 +403,13 @@ PartiallyMadePackageDepSpec::package(const QualifiedPackageName & name)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_package()
+{
+ _imp->data->package.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::slot_requirement(const std::shared_ptr<const SlotRequirement> & s)
{
_imp->data->slot = s;
@@ -410,6 +417,13 @@ PartiallyMadePackageDepSpec::slot_requirement(const std::shared_ptr<const SlotRe
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_slot_requirement()
+{
+ _imp->data->slot.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::in_repository(const RepositoryName & s)
{
_imp->data->in_repository = std::make_shared<RepositoryName>(s);
@@ -417,6 +431,13 @@ PartiallyMadePackageDepSpec::in_repository(const RepositoryName & s)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_in_repository()
+{
+ _imp->data->in_repository.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::from_repository(const RepositoryName & s)
{
_imp->data->from_repository = std::make_shared<RepositoryName>(s);
@@ -424,6 +445,13 @@ PartiallyMadePackageDepSpec::from_repository(const RepositoryName & s)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_from_repository()
+{
+ _imp->data->from_repository.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::installable_to_repository(const InstallableToRepository & s)
{
_imp->data->installable_to_repository = std::make_shared<InstallableToRepository>(s);
@@ -431,6 +459,13 @@ PartiallyMadePackageDepSpec::installable_to_repository(const InstallableToReposi
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_installable_to_repository()
+{
+ _imp->data->installable_to_repository.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::installed_at_path(const FSPath & s)
{
_imp->data->installed_at_path = std::make_shared<FSPath>(s);
@@ -438,6 +473,13 @@ PartiallyMadePackageDepSpec::installed_at_path(const FSPath & s)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_installed_at_path()
+{
+ _imp->data->installed_at_path.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::installable_to_path(const InstallableToPath & s)
{
_imp->data->installable_to_path = std::make_shared<InstallableToPath>(s);
@@ -445,6 +487,13 @@ PartiallyMadePackageDepSpec::installable_to_path(const InstallableToPath & s)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_installable_to_path()
+{
+ _imp->data->installable_to_path.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::package_name_part(const PackageNamePart & part)
{
_imp->data->package_name_part = std::make_shared<PackageNamePart>(part);
@@ -452,6 +501,13 @@ PartiallyMadePackageDepSpec::package_name_part(const PackageNamePart & part)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_package_name_part()
+{
+ _imp->data->package_name_part.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::category_name_part(const CategoryNamePart & part)
{
_imp->data->category_name_part = std::make_shared<CategoryNamePart>(part);
@@ -459,6 +515,13 @@ PartiallyMadePackageDepSpec::category_name_part(const CategoryNamePart & part)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_category_name_part()
+{
+ _imp->data->category_name_part.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::version_requirement(const VersionRequirement & req)
{
if (! _imp->data->version_requirements)
@@ -468,6 +531,13 @@ PartiallyMadePackageDepSpec::version_requirement(const VersionRequirement & req)
}
PartiallyMadePackageDepSpec &
+PartiallyMadePackageDepSpec::clear_version_requirements()
+{
+ _imp->data->version_requirements.reset();
+ return *this;
+}
+
+PartiallyMadePackageDepSpec &
PartiallyMadePackageDepSpec::version_requirements_mode(const VersionRequirementsMode & mode)
{
_imp->data->version_requirements_mode_v = mode;
diff --git a/paludis/partially_made_package_dep_spec.hh b/paludis/partially_made_package_dep_spec.hh
index 9be8426..fc034f4 100644
--- a/paludis/partially_made_package_dep_spec.hh
+++ b/paludis/partially_made_package_dep_spec.hh
@@ -54,21 +54,49 @@ namespace paludis
PartiallyMadePackageDepSpec & package(const QualifiedPackageName &);
/**
+ * Clear our package requirements, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_package();
+
+ /**
* Set our slot requirements, return ourself.
*/
PartiallyMadePackageDepSpec & slot_requirement(const std::shared_ptr<const SlotRequirement> &);
/**
+ * Clear our slot requirements, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_slot_requirement();
+
+ /**
* Set our in-repository requirement, return ourself.
*/
PartiallyMadePackageDepSpec & in_repository(const RepositoryName &);
/**
+ * Clear our in-repository requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_in_repository();
+
+ /**
* Set our from-repository requirement, return ourself.
*/
PartiallyMadePackageDepSpec & from_repository(const RepositoryName &);
/**
+ * Clear our from-repository requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_from_repository();
+
+ /**
* Set our installable-to-repository requirement, return ourself.
*
* \since 0.32
@@ -76,6 +104,13 @@ namespace paludis
PartiallyMadePackageDepSpec & installable_to_repository(const InstallableToRepository &);
/**
+ * Clear our installable-to-repository requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_installable_to_repository();
+
+ /**
* Set our installed-at-path requirement, return ourself.
*
* \since 0.32
@@ -83,6 +118,13 @@ namespace paludis
PartiallyMadePackageDepSpec & installed_at_path(const FSPath &);
/**
+ * Clear our installed-at-path requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_installed_at_path();
+
+ /**
* Set our installable-to-path requirement, return ourself.
*
* \since 0.32
@@ -90,21 +132,49 @@ namespace paludis
PartiallyMadePackageDepSpec & installable_to_path(const InstallableToPath &);
/**
+ * Clear our installable-to-path requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_installable_to_path();
+
+ /**
* Set our package name part requirements, return ourself.
*/
PartiallyMadePackageDepSpec & package_name_part(const PackageNamePart &);
/**
+ * Clear our package name part requirements, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_package_name_part();
+
+ /**
* Set our category name part requirements, return ourself.
*/
PartiallyMadePackageDepSpec & category_name_part(const CategoryNamePart &);
/**
+ * Clear our category name part requirements, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_category_name_part();
+
+ /**
* Add a version requirement, return ourself.
*/
PartiallyMadePackageDepSpec & version_requirement(const VersionRequirement &);
/**
+ * Clear all version requirement, return ourself.
+ *
+ * \since 0.55
+ */
+ PartiallyMadePackageDepSpec & clear_version_requirements();
+
+ /**
* Set our version requirements mode, return ourself.
*/
PartiallyMadePackageDepSpec & version_requirements_mode(const VersionRequirementsMode &);