aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/fake
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-26 06:22:59 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-26 06:22:59 +0000
commit676210330328f04eda39fa5ee9b173e3acc86b88 (patch)
treef4603334a8cb43a35ce29d6cd473c41e5afeb71f /paludis/repositories/fake
parentff653fb58c83e7269c3b6ae85ed5b1ff55232b9f (diff)
downloadpaludis-676210330328f04eda39fa5ee9b173e3acc86b88.tar.gz
paludis-676210330328f04eda39fa5ee9b173e3acc86b88.tar.xz
Kill repository NVIs, License interface. Fixes: ticket:394
Diffstat (limited to 'paludis/repositories/fake')
-rw-r--r--paludis/repositories/fake/fake_installed_repository.cc3
-rw-r--r--paludis/repositories/fake/fake_installed_repository.hh4
-rw-r--r--paludis/repositories/fake/fake_repository.cc3
-rw-r--r--paludis/repositories/fake/fake_repository.hh5
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc28
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh109
6 files changed, 75 insertions, 77 deletions
diff --git a/paludis/repositories/fake/fake_installed_repository.cc b/paludis/repositories/fake/fake_installed_repository.cc
index 5bc37c6e6..644959b79 100644
--- a/paludis/repositories/fake/fake_installed_repository.cc
+++ b/paludis/repositories/fake/fake_installed_repository.cc
@@ -47,7 +47,6 @@ FakeInstalledRepository::FakeInstalledRepository(const Environment * const e, co
.provides_interface(this)
.virtuals_interface(0)
.destination_interface(this)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -168,7 +167,7 @@ namespace
}
bool
-FakeInstalledRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+FakeInstalledRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh
index bbc26d9ae..782c22a96 100644
--- a/paludis/repositories/fake/fake_installed_repository.hh
+++ b/paludis/repositories/fake/fake_installed_repository.hh
@@ -36,8 +36,6 @@ namespace paludis
public RepositoryProvidesInterface
{
protected:
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
/* RepositoryInstalledInterface */
virtual FSEntry root() const PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -68,6 +66,8 @@ namespace paludis
~FakeInstalledRepository();
///\}
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/fake/fake_repository.cc b/paludis/repositories/fake/fake_repository.cc
index e666f79a8..425c46996 100644
--- a/paludis/repositories/fake/fake_repository.cc
+++ b/paludis/repositories/fake/fake_repository.cc
@@ -67,7 +67,6 @@ FakeRepository::FakeRepository(const Environment * const e, const RepositoryName
.virtuals_interface(DistributionData::get_instance()->distribution_from_string(
e->default_distribution())->support_old_style_virtuals ? this : 0)
.destination_interface(0)
- .licenses_interface(0)
.e_interface(0)
.make_virtuals_interface(0)
.qa_interface(0)
@@ -152,7 +151,7 @@ namespace
}
bool
-FakeRepository::do_some_ids_might_support_action(const SupportsActionTestBase & a) const
+FakeRepository::some_ids_might_support_action(const SupportsActionTestBase & a) const
{
SupportsActionQuery q;
a.accept(q);
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index c79b98f10..6eea6335b 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -38,9 +38,6 @@ namespace paludis
private:
Implementation<FakeRepository> * const _imp;
- protected:
- virtual bool do_some_ids_might_support_action(const SupportsActionTestBase &) const;
-
public:
///\name Basic operations
///\{
@@ -66,6 +63,8 @@ namespace paludis
PALUDIS_ATTRIBUTE((warn_unused_result));
virtual MirrorsConstIterator end_mirrors(const std::string & s) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool some_ids_might_support_action(const SupportsActionTestBase &) const;
};
}
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 645d8d7e9..5ffec0369 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -93,13 +93,13 @@ FakeRepositoryBase::~FakeRepositoryBase()
}
bool
-FakeRepositoryBase::do_has_category_named(const CategoryNamePart & c) const
+FakeRepositoryBase::has_category_named(const CategoryNamePart & c) const
{
return (_imp->category_names->end() != _imp->category_names->find(c));
}
bool
-FakeRepositoryBase::do_has_package_named(const QualifiedPackageName & q) const
+FakeRepositoryBase::has_package_named(const QualifiedPackageName & q) const
{
return has_category_named(q.category) &&
(_imp->package_names.find(q.category)->second->end() !=
@@ -107,13 +107,13 @@ FakeRepositoryBase::do_has_package_named(const QualifiedPackageName & q) const
}
tr1::shared_ptr<const CategoryNamePartSet>
-FakeRepositoryBase::do_category_names() const
+FakeRepositoryBase::category_names() const
{
return _imp->category_names;
}
tr1::shared_ptr<const QualifiedPackageNameSet>
-FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
+FakeRepositoryBase::package_names(const CategoryNamePart & c) const
{
tr1::shared_ptr<QualifiedPackageNameSet> result(new QualifiedPackageNameSet);
if (! has_category_named(c))
@@ -127,7 +127,7 @@ FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
}
tr1::shared_ptr<const PackageIDSequence>
-FakeRepositoryBase::do_package_ids(const QualifiedPackageName & n) const
+FakeRepositoryBase::package_ids(const QualifiedPackageName & n) const
{
if (! has_category_named(n.category))
return tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
@@ -161,25 +161,25 @@ FakeRepositoryBase::add_version(const QualifiedPackageName & q, const VersionSpe
}
UseFlagState
-FakeRepositoryBase::do_query_use(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use(const UseFlagName &, const PackageID &) const
{
return use_unspecified;
}
bool
-FakeRepositoryBase::do_query_use_mask(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use_mask(const UseFlagName &, const PackageID &) const
{
return false;
}
bool
-FakeRepositoryBase::do_query_use_force(const UseFlagName &, const PackageID &) const
+FakeRepositoryBase::query_use_force(const UseFlagName &, const PackageID &) const
{
return false;
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_arch_flags() const
+FakeRepositoryBase::arch_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
@@ -200,19 +200,19 @@ FakeRepositoryBase::invalidate_masks()
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_flags() const
+FakeRepositoryBase::use_expand_flags() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_hidden_prefixes() const
+FakeRepositoryBase::use_expand_hidden_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
tr1::shared_ptr<const UseFlagNameSet>
-FakeRepositoryBase::do_use_expand_prefixes() const
+FakeRepositoryBase::use_expand_prefixes() const
{
return tr1::shared_ptr<const UseFlagNameSet>(new UseFlagNameSet);
}
@@ -224,7 +224,7 @@ FakeRepositoryBase::add_package_set(const SetName & n, tr1::shared_ptr<SetSpecTr
}
tr1::shared_ptr<SetSpecTree::ConstItem>
-FakeRepositoryBase::do_package_set(const SetName & id) const
+FakeRepositoryBase::package_set(const SetName & id) const
{
std::map<SetName, tr1::shared_ptr<SetSpecTree::ConstItem> >::const_iterator i(_imp->sets.find(id));
if (_imp->sets.end() == i)
@@ -243,7 +243,7 @@ FakeRepositoryBase::sets_list() const
}
std::string
-FakeRepositoryBase::do_describe_use_flag(const UseFlagName &,
+FakeRepositoryBase::describe_use_flag(const UseFlagName &,
const PackageID &) const
{
return "";
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index ae11527e6..3af5a5122 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -56,60 +56,6 @@ namespace paludis
FakeRepositoryBase(const Environment * const env, const RepositoryName & name,
const RepositoryCapabilities & caps, const std::string &);
- /* RepositoryUseInterface */
-
- virtual UseFlagState do_query_use(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_mask(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_query_use_force(const UseFlagName &, const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_arch_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_flags() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_hidden_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const UseFlagNameSet> do_use_expand_prefixes() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual std::string do_describe_use_flag(const UseFlagName &,
- const PackageID &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* RepositorySetsInterface */
-
- virtual tr1::shared_ptr<SetSpecTree::ConstItem> do_package_set(const SetName & id) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const SetNameSet> sets_list() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- /* Repository */
-
- virtual tr1::shared_ptr<const PackageIDSequence> do_package_ids(
- const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const QualifiedPackageNameSet> do_package_names(
- const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual tr1::shared_ptr<const CategoryNamePartSet> do_category_names() const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_package_named(const QualifiedPackageName &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- virtual bool do_has_category_named(const CategoryNamePart &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
public:
/**
* Destructor.
@@ -155,6 +101,61 @@ namespace paludis
* Fetch our associated environment.
*/
const Environment * environment() const;
+
+ /* RepositoryUseInterface */
+
+ virtual UseFlagState query_use(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_mask(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool query_use_force(const UseFlagName &, const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> arch_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_flags() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_hidden_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const UseFlagNameSet> use_expand_prefixes() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual std::string describe_use_flag(const UseFlagName &,
+ const PackageID &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* RepositorySetsInterface */
+
+ virtual tr1::shared_ptr<SetSpecTree::ConstItem> package_set(const SetName & id) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const SetNameSet> sets_list() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /* Repository */
+
+ virtual tr1::shared_ptr<const PackageIDSequence> package_ids(
+ const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const QualifiedPackageNameSet> package_names(
+ const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual tr1::shared_ptr<const CategoryNamePartSet> category_names() const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_package_named(const QualifiedPackageName &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ virtual bool has_category_named(const CategoryNamePart &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
};
}