aboutsummaryrefslogtreecommitdiff
path: root/0.8.0/paludis/repositories/fake
diff options
context:
space:
mode:
Diffstat (limited to '0.8.0/paludis/repositories/fake')
-rw-r--r--0.8.0/paludis/repositories/fake/Makefile.am31
-rw-r--r--0.8.0/paludis/repositories/fake/fake_installed_repository.cc49
-rw-r--r--0.8.0/paludis/repositories/fake/fake_installed_repository.hh41
-rw-r--r--0.8.0/paludis/repositories/fake/fake_repository.cc47
-rw-r--r--0.8.0/paludis/repositories/fake/fake_repository.hh40
-rw-r--r--0.8.0/paludis/repositories/fake/fake_repository_base.cc258
-rw-r--r--0.8.0/paludis/repositories/fake/fake_repository_base.hh146
7 files changed, 612 insertions, 0 deletions
diff --git a/0.8.0/paludis/repositories/fake/Makefile.am b/0.8.0/paludis/repositories/fake/Makefile.am
new file mode 100644
index 0000000..820ba2a
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/Makefile.am
@@ -0,0 +1,31 @@
+CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
+MAINTAINERCLEANFILES = Makefile.in
+
+AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
+DEFS= \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DDATADIR=\"$(datadir)\"
+
+paludis_repositories_libdir = $(libdir)/paludis/repositories
+paludis_repositories_lib_LTLIBRARIES = libpaludisfakerepository.la
+
+libpaludisfakerepository_la_SOURCES = \
+ fake_repository_base.cc fake_repository_base.hh \
+ fake_repository.cc fake_repository.hh \
+ fake_installed_repository.cc fake_installed_repository.hh
+
+libpaludisfakerepository_la_LIBADD = \
+ $(top_builddir)/paludis/libpaludis.la \
+ $(top_builddir)/paludis/util/libpaludisutil.la \
+ $(DYNAMIC_LD_LIBS)
+
+libpaludisfakerepository_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
+
+paludis_repositories_fake_includedir = $(includedir)/paludis/repositories/fake/
+paludis_repositories_fake_include_HEADERS = \
+ fake_repository.hh \
+ fake_repository_base.hh \
+ fake_installed_repository.hh
+
+
diff --git a/0.8.0/paludis/repositories/fake/fake_installed_repository.cc b/0.8.0/paludis/repositories/fake/fake_installed_repository.cc
new file mode 100644
index 0000000..9afa130
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_installed_repository.cc
@@ -0,0 +1,49 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "fake_installed_repository.hh"
+
+using namespace paludis;
+
+FakeInstalledRepository::FakeInstalledRepository(const RepositoryName & our_name) :
+ FakeRepositoryBase(our_name, RepositoryCapabilities::create()
+ .installable_interface(0)
+ .installed_interface(this)
+ .mask_interface(this)
+ .news_interface(0)
+ .sets_interface(0)
+ .syncable_interface(0)
+ .uninstallable_interface(0)
+ .use_interface(this)
+ .world_interface(0)
+ .mirrors_interface(0)
+ .environment_variable_interface(0)
+ .provides_interface(0)
+ .virtuals_interface(0))
+{
+}
+
+Contents::ConstPointer
+FakeInstalledRepository::do_contents(const QualifiedPackageName &,
+ const VersionSpec &) const
+{
+ Contents::ConstPointer result(new Contents);
+ return result;
+}
+
diff --git a/0.8.0/paludis/repositories/fake/fake_installed_repository.hh b/0.8.0/paludis/repositories/fake/fake_installed_repository.hh
new file mode 100644
index 0000000..899a916
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_installed_repository.hh
@@ -0,0 +1,41 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_INSTALLED_REPOSITORY_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_INSTALLED_REPOSITORY_HH 1
+
+#include <paludis/repositories/fake/fake_repository_base.hh>
+
+namespace paludis
+{
+ class PALUDIS_VISIBLE FakeInstalledRepository :
+ public FakeRepositoryBase,
+ public RepositoryInstalledInterface
+ {
+ protected:
+ virtual Contents::ConstPointer do_contents(
+ const QualifiedPackageName &,
+ const VersionSpec &) const;
+
+ public:
+ FakeInstalledRepository(const RepositoryName &);
+ };
+}
+
+#endif
diff --git a/0.8.0/paludis/repositories/fake/fake_repository.cc b/0.8.0/paludis/repositories/fake/fake_repository.cc
new file mode 100644
index 0000000..f573ef0
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_repository.cc
@@ -0,0 +1,47 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "fake_repository.hh"
+
+using namespace paludis;
+
+FakeRepository::FakeRepository(const RepositoryName & our_name) :
+ FakeRepositoryBase(our_name, RepositoryCapabilities::create()
+ .installable_interface(this)
+ .installed_interface(0)
+ .mask_interface(this)
+ .news_interface(0)
+ .sets_interface(0)
+ .syncable_interface(0)
+ .uninstallable_interface(0)
+ .use_interface(this)
+ .world_interface(0)
+ .mirrors_interface(0)
+ .environment_variable_interface(0)
+ .provides_interface(0)
+ .virtuals_interface(0))
+{
+}
+
+void
+FakeRepository::do_install(const QualifiedPackageName &, const VersionSpec &,
+ const InstallOptions &) const
+{
+}
+
diff --git a/0.8.0/paludis/repositories/fake/fake_repository.hh b/0.8.0/paludis/repositories/fake/fake_repository.hh
new file mode 100644
index 0000000..a39c42f
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_repository.hh
@@ -0,0 +1,40 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_REPOSITORY_HH
+#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_FAKE_FAKE_REPOSITORY_HH 1
+
+#include <paludis/repositories/fake/fake_repository_base.hh>
+
+namespace paludis
+{
+ class PALUDIS_VISIBLE FakeRepository :
+ public FakeRepositoryBase,
+ public RepositoryInstallableInterface
+ {
+ protected:
+ virtual void do_install(const QualifiedPackageName &, const VersionSpec &,
+ const InstallOptions &) const;
+
+ public:
+ FakeRepository(const RepositoryName &);
+ };
+}
+
+#endif
diff --git a/0.8.0/paludis/repositories/fake/fake_repository_base.cc b/0.8.0/paludis/repositories/fake/fake_repository_base.cc
new file mode 100644
index 0000000..efbec73
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_repository_base.cc
@@ -0,0 +1,258 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <map>
+#include <paludis/repositories/fake/fake_repository_base.hh>
+#include <paludis/util/stringify.hh>
+#include <paludis/util/collection_concrete.hh>
+#include <paludis/version_metadata.hh>
+#include <paludis/portage_dep_parser.hh>
+
+/** \file
+ * Implementation for FakeRepositoryBase.
+ *
+ * \ingroup grpfakerepository
+ */
+
+using namespace paludis;
+
+namespace paludis
+{
+ /**
+ * Implementation data for FakeRepositoryBase.
+ *
+ * \ingroup grpfakerepository
+ */
+ template<>
+ struct Implementation<FakeRepositoryBase> :
+ private InstantiationPolicy<Implementation<FakeRepositoryBase>, instantiation_method::NonCopyableTag>,
+ InternalCounted<Implementation<FakeRepositoryBase> >
+ {
+ /// Our category names.
+ CategoryNamePartCollection::Pointer category_names;
+
+ /// Our package names.
+ std::map<CategoryNamePart, PackageNamePartCollection::Pointer > package_names;
+
+ /// Our versions.
+ std::map<QualifiedPackageName, VersionSpecCollection::Pointer > versions;
+
+ /// Our metadata.
+ std::map<std::string, VersionMetadata::Pointer > metadata;
+
+ /// (Empty) provides map.
+ const std::map<QualifiedPackageName, QualifiedPackageName> provide_map;
+
+ /// Constructor.
+ Implementation();
+ };
+
+ Implementation<FakeRepositoryBase>::Implementation() :
+ category_names(new CategoryNamePartCollection::Concrete)
+ {
+ }
+}
+
+FakeRepositoryBase::FakeRepositoryBase(const RepositoryName & our_name, const RepositoryCapabilities & caps) :
+ Repository(our_name, caps),
+ RepositoryMaskInterface(),
+ RepositoryUseInterface(),
+ PrivateImplementationPattern<FakeRepositoryBase>(new Implementation<FakeRepositoryBase>)
+{
+ RepositoryInfoSection::Pointer config_info(new RepositoryInfoSection("Configuration information"));
+ config_info->add_kv("format", "fake");
+
+ _info->add_section(config_info);
+}
+
+FakeRepositoryBase::~FakeRepositoryBase()
+{
+}
+
+bool
+FakeRepositoryBase::do_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
+{
+ return has_category_named(q.category) &&
+ (_imp->package_names.find(q.category)->second->end() !=
+ _imp->package_names.find(q.category)->second->find(q.package));
+}
+
+CategoryNamePartCollection::ConstPointer
+FakeRepositoryBase::do_category_names() const
+{
+ return _imp->category_names;
+}
+
+QualifiedPackageNameCollection::ConstPointer
+FakeRepositoryBase::do_package_names(const CategoryNamePart & c) const
+{
+ if (! has_category_named(c))
+ throw InternalError(PALUDIS_HERE, "no category named " + stringify(c));
+ QualifiedPackageNameCollection::Pointer result(new QualifiedPackageNameCollection::Concrete);
+ PackageNamePartCollection::Iterator p(_imp->package_names.find(c)->second->begin()),
+ p_end(_imp->package_names.find(c)->second->end());
+ for ( ; p != p_end ; ++p)
+ result->insert(c + *p);
+ return result;
+}
+
+VersionSpecCollection::ConstPointer
+FakeRepositoryBase::do_version_specs(const QualifiedPackageName & n) const
+{
+ if (! has_category_named(n.category))
+ throw InternalError(PALUDIS_HERE, "no category");
+ if (! has_package_named(n))
+ throw InternalError(PALUDIS_HERE, "no package");
+ return _imp->versions.find(n)->second;
+}
+
+bool
+FakeRepositoryBase::do_has_version(const QualifiedPackageName & q, const VersionSpec & v) const
+{
+ if (! has_category_named(q.category))
+ throw InternalError(PALUDIS_HERE, "no category");
+ if (! has_package_named(q))
+ throw InternalError(PALUDIS_HERE, "no package");
+ return _imp->versions.find(q)->second->find(v) !=
+ _imp->versions.find(q)->second->end();
+}
+
+void
+FakeRepositoryBase::add_category(const CategoryNamePart & c)
+{
+ _imp->category_names->insert(c);
+ _imp->package_names.insert(std::make_pair(c, new PackageNamePartCollection::Concrete));
+}
+
+void
+FakeRepositoryBase::add_package(const QualifiedPackageName & q)
+{
+ add_category(q.category);
+ _imp->package_names.find(q.category)->second->insert(q.package);
+ _imp->versions.insert(std::make_pair(q, new VersionSpecCollection::Concrete));
+}
+
+VersionMetadata::Pointer
+FakeRepositoryBase::add_version(const QualifiedPackageName & q, const VersionSpec & v)
+{
+ add_package(q);
+ _imp->versions.find(q)->second->insert(v);
+ _imp->metadata.insert(
+ std::make_pair(stringify(q) + "-" + stringify(v),
+ VersionMetadata::Pointer(new VersionMetadata::Ebuild(PortageDepParser::parse_depend))));
+ VersionMetadata::Pointer r(_imp->metadata.find(stringify(q) + "-" + stringify(v))->second);
+ r->slot = SlotName("0");
+ r->eapi = "0";
+ r->get_ebuild_interface()->keywords = "test";
+ return r;
+}
+
+VersionMetadata::ConstPointer
+FakeRepositoryBase::do_version_metadata(
+ const QualifiedPackageName & q, const VersionSpec & v) const
+{
+ if (! has_version(q, v))
+ throw InternalError(PALUDIS_HERE, "no version");
+ return _imp->metadata.find(stringify(q) + "-" + stringify(v))->second;
+}
+
+bool
+FakeRepositoryBase::do_query_repository_masks(const QualifiedPackageName &,
+ const VersionSpec &) const
+{
+ return false;
+}
+
+bool
+FakeRepositoryBase::do_query_profile_masks(const QualifiedPackageName &, const VersionSpec &) const
+{
+ return false;
+}
+
+UseFlagState
+FakeRepositoryBase::do_query_use(const UseFlagName &, const PackageDatabaseEntry *) const
+{
+ return use_unspecified;
+}
+
+bool
+FakeRepositoryBase::do_query_use_mask(const UseFlagName &, const PackageDatabaseEntry *) const
+{
+ return false;
+}
+
+bool
+FakeRepositoryBase::do_query_use_force(const UseFlagName &, const PackageDatabaseEntry *) const
+{
+ return false;
+}
+
+UseFlagNameCollection::ConstPointer
+FakeRepositoryBase::do_arch_flags() const
+{
+ return UseFlagNameCollection::ConstPointer(new UseFlagNameCollection::Concrete);
+}
+
+bool
+FakeRepositoryBase::do_is_licence(const std::string &) const
+{
+ return false;
+}
+
+void
+FakeRepositoryBase::invalidate() const
+{
+}
+
+UseFlagNameCollection::ConstPointer
+FakeRepositoryBase::do_use_expand_flags() const
+{
+ return UseFlagNameCollection::ConstPointer(new UseFlagNameCollection::Concrete);
+}
+
+UseFlagNameCollection::ConstPointer
+FakeRepositoryBase::do_use_expand_hidden_prefixes() const
+{
+ return UseFlagNameCollection::ConstPointer(new UseFlagNameCollection::Concrete);
+}
+
+UseFlagNameCollection::ConstPointer
+FakeRepositoryBase::do_use_expand_prefixes() const
+{
+ return UseFlagNameCollection::ConstPointer(new UseFlagNameCollection::Concrete);
+}
+
+UseFlagName
+FakeRepositoryBase::do_use_expand_name(const UseFlagName & u) const
+{
+ return u;
+}
+
+UseFlagName
+FakeRepositoryBase::do_use_expand_value(const UseFlagName & u) const
+{
+ return u;
+}
+
diff --git a/0.8.0/paludis/repositories/fake/fake_repository_base.hh b/0.8.0/paludis/repositories/fake/fake_repository_base.hh
new file mode 100644
index 0000000..287e7d6
--- /dev/null
+++ b/0.8.0/paludis/repositories/fake/fake_repository_base.hh
@@ -0,0 +1,146 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef PALUDIS_GUARD_PALUDIS_FAKE_REPOSITORY_BASE_HH
+#define PALUDIS_GUARD_PALUDIS_FAKE_REPOSITORY_BASE_HH 1
+
+#include <paludis/repository.hh>
+#include <paludis/util/private_implementation_pattern.hh>
+
+/** \file
+ * Declarations for the FakeRepositoryBase class.
+ *
+ * \ingroup grpfakerepository
+ */
+
+namespace paludis
+{
+ /**
+ * A FakeRepositoryBase is a Repository subclass whose subclasses are used for
+ * various test cases.
+ *
+ * \see FakeRepository
+ * \see FakeInstalledRepository
+ * \ingroup grpfakerepository
+ */
+ class PALUDIS_VISIBLE FakeRepositoryBase :
+ public Repository,
+ public RepositoryMaskInterface,
+ public RepositoryUseInterface,
+ private PrivateImplementationPattern<FakeRepositoryBase>
+ {
+ protected:
+ /* RepositoryUseInterface */
+
+ virtual UseFlagState do_query_use(const UseFlagName &, const PackageDatabaseEntry *) const;
+ virtual bool do_query_use_mask(const UseFlagName &, const PackageDatabaseEntry *) const;
+ virtual bool do_query_use_force(const UseFlagName &, const PackageDatabaseEntry *) const;
+ virtual UseFlagNameCollection::ConstPointer do_arch_flags() const;
+ virtual UseFlagNameCollection::ConstPointer do_use_expand_flags() const;
+ virtual UseFlagNameCollection::ConstPointer do_use_expand_hidden_prefixes() const;
+ virtual UseFlagNameCollection::ConstPointer do_use_expand_prefixes() const;
+ virtual UseFlagName do_use_expand_name(const UseFlagName & u) const;
+ virtual UseFlagName do_use_expand_value(const UseFlagName & u) const;
+
+ /* end of RepositoryUseInterface */
+
+ virtual bool do_has_category_named(const CategoryNamePart &) const;
+
+ virtual bool do_has_package_named(const QualifiedPackageName &) const;
+
+ virtual CategoryNamePartCollection::ConstPointer do_category_names() const;
+
+ virtual QualifiedPackageNameCollection::ConstPointer do_package_names(
+ const CategoryNamePart &) const;
+
+ virtual VersionSpecCollection::ConstPointer do_version_specs(
+ const QualifiedPackageName &) const;
+
+ virtual bool do_has_version(const QualifiedPackageName &,
+ const VersionSpec &) const;
+
+ virtual VersionMetadata::ConstPointer do_version_metadata(
+ const QualifiedPackageName &,
+ const VersionSpec &) const;
+
+ virtual bool do_query_repository_masks(const QualifiedPackageName &,
+ const VersionSpec &) const;
+
+ virtual bool do_query_profile_masks(const QualifiedPackageName &,
+ const VersionSpec &) const;
+
+ virtual bool do_is_licence(const std::string &) const;
+
+ protected:
+ /**
+ * Constructor.
+ */
+ FakeRepositoryBase(const RepositoryName & name, const RepositoryCapabilities & caps);
+
+ public:
+ /**
+ * Destructor.
+ */
+
+ ~FakeRepositoryBase();
+
+ /**
+ * Add a category.
+ */
+ void add_category(const CategoryNamePart &);
+
+ /**
+ * Add a package, and a category if necessary.
+ */
+ void add_package(const QualifiedPackageName &);
+
+ /**
+ * Add a version, and a package and category if necessary, and set some
+ * default values for its metadata, and return said metadata.
+ */
+ VersionMetadata::Pointer add_version(
+ const QualifiedPackageName &, const VersionSpec &);
+
+ /**
+ * Add a version, and a package and category if necessary, and set some
+ * default values for its metadata, and return said metadata (convenience
+ * overload taking strings).
+ */
+ VersionMetadata::Pointer add_version(
+ const std::string & c, const std::string & p, const std::string & v)
+ {
+ return add_version(CategoryNamePart(c) + PackageNamePart(p), VersionSpec(v));
+ }
+
+ /**
+ * A non-constant smart pointer to ourself.
+ */
+ typedef CountedPtr<FakeRepositoryBase, count_policy::InternalCountTag> Pointer;
+
+ /**
+ * A constant smart pointer to ourself.
+ */
+ typedef CountedPtr<const FakeRepositoryBase, count_policy::InternalCountTag> ConstPointer;
+
+ virtual void invalidate() const;
+ };
+}
+
+
+#endif