aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-18 22:19:25 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-18 22:19:25 +0000
commit4fd61d1e8a673a714048f9c674e5ca75ef45e6c0 (patch)
treeb6a40dc258b4610931d4372c67c14e8d34085381
parentdec0869156a57241709e49ca735d15777003285a (diff)
downloadpaludis-4fd61d1e8a673a714048f9c674e5ca75ef45e6c0.tar.gz
paludis-4fd61d1e8a673a714048f9c674e5ca75ef45e6c0.tar.xz
More doxygen work, remove a few unused functions.
-rw-r--r--paludis/args/args_group.hh5
-rw-r--r--paludis/args/args_option.hh3
-rw-r--r--paludis/dep_list/dep_list.hh37
-rw-r--r--paludis/dep_list/dep_list_TEST.hh4
-rw-r--r--paludis/dep_list/range_rewriter.hh22
-rw-r--r--paludis/dep_list/uninstall_list.hh26
-rw-r--r--paludis/dep_spec.hh3
-rw-r--r--paludis/environments/environment_maker.hh48
-rw-r--r--paludis/environments/no_config/no_config_environment.hh14
-rw-r--r--paludis/environments/no_config/no_config_environment.sr10
-rw-r--r--paludis/environments/paludis/paludis_config.hh21
-rw-r--r--paludis/environments/paludis/paludis_environment.hh5
-rw-r--r--paludis/environments/portage/portage_environment.hh23
-rw-r--r--paludis/hooker.hh20
-rw-r--r--paludis/host_tuple_name.hh8
-rw-r--r--paludis/merger/merger.hh72
-rw-r--r--paludis/merger/unmerger.hh36
-rw-r--r--paludis/name.hh3
-rw-r--r--paludis/package_database.hh11
-rw-r--r--paludis/package_database_entry.hh5
-rw-r--r--paludis/portage_dep_parser.hh22
-rw-r--r--paludis/qa/broken_global_variables_check.hh9
-rw-r--r--paludis/qa/check.hh5
-rw-r--r--paludis/qa/ebuild_check.sr10
-rw-r--r--paludis/qa/per_profile_ebuild_check.sr10
-rw-r--r--paludis/qa/profile_check.sr10
-rw-r--r--paludis/qa/qa_environment.sr9
-rw-r--r--paludis/query.hh176
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc6
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh9
-rw-r--r--paludis/repositories/cran/cran_version_metadata.hh11
-rw-r--r--paludis/repositories/fake/fake_installed_repository.hh5
-rw-r--r--paludis/repositories/fake/fake_repository.hh8
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc18
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh12
-rw-r--r--paludis/repositories/gentoo/ebin.hh108
-rw-r--r--paludis/repositories/gentoo/ebin_entries.hh13
-rw-r--r--paludis/repositories/gentoo/ebuild.hh24
-rw-r--r--paludis/repositories/gentoo/ebuild.sr20
-rw-r--r--paludis/repositories/gentoo/ebuild_entries.hh11
-rw-r--r--paludis/repositories/gentoo/glsa.hh61
-rw-r--r--paludis/repositories/gentoo/glsa.sr15
-rw-r--r--paludis/repositories/gentoo/make_ebin_repository.hh6
-rw-r--r--paludis/repositories/gentoo/make_ebuild_repository.hh6
-rw-r--r--paludis/repositories/gentoo/portage_repository.cc30
-rw-r--r--paludis/repositories/gentoo/portage_repository.hh11
-rw-r--r--paludis/repositories/gentoo/portage_repository_entries.hh6
-rw-r--r--paludis/repositories/gentoo/portage_repository_profile_file.hh15
-rw-r--r--paludis/repositories/gentoo/portage_virtual_version_metadata.hh11
-rw-r--r--paludis/repositories/gentoo/vdb_merger.hh11
-rw-r--r--paludis/repositories/gentoo/vdb_repository.cc12
-rw-r--r--paludis/repositories/gentoo/vdb_repository.hh8
-rw-r--r--paludis/repositories/gentoo/vdb_unmerger.hh32
-rw-r--r--paludis/repositories/gentoo/vdb_version_metadata.hh26
-rw-r--r--paludis/repositories/repository_maker.hh5
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc6
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh2
-rw-r--r--paludis/repositories/virtuals/vr_entry.sr9
-rw-r--r--paludis/set_file.hh5
-rw-r--r--paludis/util/graph-impl.hh56
-rw-r--r--paludis/util/graph.hh75
-rw-r--r--paludis/util/iterator.hh8
-rw-r--r--paludis/util/private_implementation_pattern.hh19
-rw-r--r--paludis/util/sr.hh1
-rw-r--r--paludis/util/system.hh79
-rw-r--r--paludis/util/virtual_constructor-impl.hh8
-rw-r--r--paludis/util/visitor.hh8
-rw-r--r--paludis/version_metadata.hh21
-rw-r--r--paludis/version_requirements.hh6
-rw-r--r--paludis/version_spec.hh5
-rw-r--r--paludis/version_spec.sr9
71 files changed, 1331 insertions, 113 deletions
diff --git a/paludis/args/args_group.hh b/paludis/args/args_group.hh
index bd125a2..05f30ec 100644
--- a/paludis/args/args_group.hh
+++ b/paludis/args/args_group.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2005, 2006, 2007 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
@@ -57,6 +57,9 @@ namespace paludis
ArgsHandler * _handler;
public:
+ /**
+ * Fetch our handler.
+ */
ArgsHandler * handler()
{
return _handler;
diff --git a/paludis/args/args_option.hh b/paludis/args/args_option.hh
index c152a4b..f6a3a35 100644
--- a/paludis/args/args_option.hh
+++ b/paludis/args/args_option.hh
@@ -306,6 +306,9 @@ namespace paludis
_other->set_specified(value);
}
+ /**
+ * Fetch our associated option.
+ */
ArgsOption * other() const
{
return _other;
diff --git a/paludis/dep_list/dep_list.hh b/paludis/dep_list/dep_list.hh
index ed46387..b76c220 100644
--- a/paludis/dep_list/dep_list.hh
+++ b/paludis/dep_list/dep_list.hh
@@ -58,27 +58,64 @@ namespace paludis
friend class QueryVisitor;
friend class ShowSuggestVisitor;
+ /**
+ * Find an appropriate destination for a package.
+ */
std::tr1::shared_ptr<Repository> find_destination(const PackageDatabaseEntry &,
std::tr1::shared_ptr<const DestinationsCollection>);
+ /**
+ * Add a DepSpec with role context.
+ */
void add_in_role(std::tr1::shared_ptr<const DepSpec>, const std::string & role,
std::tr1::shared_ptr<const DestinationsCollection>);
+
+ /**
+ * Return whether we prefer the first parameter, which is installed,
+ * over the second, which isn't.
+ */
bool prefer_installed_over_uninstalled(const PackageDatabaseEntry &,
const PackageDatabaseEntry &);
+ /**
+ * Add a package to the list.
+ */
void add_package(const PackageDatabaseEntry &, std::tr1::shared_ptr<const DepTag>,
std::tr1::shared_ptr<const DestinationsCollection> destinations);
+
+ /**
+ * Add an already installed package to the list.
+ */
void add_already_installed_package(const PackageDatabaseEntry &, std::tr1::shared_ptr<const DepTag>,
std::tr1::shared_ptr<const DestinationsCollection> destinations);
+
+ /**
+ * Add an error package to the list.
+ */
void add_error_package(const PackageDatabaseEntry &, const DepListEntryKind);
+
+ /**
+ * Add a suggested package to the list.
+ */
void add_suggested_package(const PackageDatabaseEntry &,
std::tr1::shared_ptr<const DestinationsCollection> destinations);
+ /**
+ * Add predependencies.
+ */
void add_predeps(std::tr1::shared_ptr<const DepSpec>, const DepListDepsOption, const std::string &,
std::tr1::shared_ptr<const DestinationsCollection> destinations);
+
+ /**
+ * Add postdependencies.
+ */
void add_postdeps(std::tr1::shared_ptr<const DepSpec>, const DepListDepsOption, const std::string &,
std::tr1::shared_ptr<const DestinationsCollection> destinations);
+ /**
+ * Return whether the specified PackageDatabaseEntry is matched by
+ * the top level target.
+ */
bool is_top_level_target(const PackageDatabaseEntry &) const;
public:
diff --git a/paludis/dep_list/dep_list_TEST.hh b/paludis/dep_list/dep_list_TEST.hh
index c44aef2..965b4b7 100644
--- a/paludis/dep_list/dep_list_TEST.hh
+++ b/paludis/dep_list/dep_list_TEST.hh
@@ -38,6 +38,8 @@
using namespace paludis;
using namespace test;
+#ifndef DOXYGEN
+
namespace paludis
{
class DepListEntry;
@@ -170,3 +172,5 @@ namespace test_cases
}
#endif
+
+#endif
diff --git a/paludis/dep_list/range_rewriter.hh b/paludis/dep_list/range_rewriter.hh
index 40884d7..1a10a31 100644
--- a/paludis/dep_list/range_rewriter.hh
+++ b/paludis/dep_list/range_rewriter.hh
@@ -24,6 +24,14 @@
namespace paludis
{
+ /**
+ * Rewrite a DepSpec heirarchy to replace AllDepSpec and AnyDepSpec
+ * collections of PackageDepSpec with a single PackageDepSpec using ranged
+ * dependencies.
+ *
+ * \ingroup grpdepresolver
+ * \nosubgrouping
+ */
class RangeRewriter :
public DepSpecVisitorTypes::ConstVisitor
{
@@ -32,9 +40,18 @@ namespace paludis
bool _invalid;
public:
+ ///\name Basic operations
+ ///\{
+
RangeRewriter();
virtual ~RangeRewriter();
+ ///\}
+
+ /**
+ * Our rewritten spec, or a zero pointer if we couldn't do any
+ * rewriting.
+ */
std::tr1::shared_ptr<const PackageDepSpec> spec() const
{
if (_invalid)
@@ -43,12 +60,17 @@ namespace paludis
return _spec;
}
+ ///\name Visit methods
+ ///\{
+
void visit(const AllDepSpec *);
void visit(const AnyDepSpec *);
void visit(const UseDepSpec *);
void visit(const PlainTextDepSpec *);
void visit(const PackageDepSpec *);
void visit(const BlockDepSpec *);
+
+ ///\}
};
}
diff --git a/paludis/dep_list/uninstall_list.hh b/paludis/dep_list/uninstall_list.hh
index dede3e5..5b3f406 100644
--- a/paludis/dep_list/uninstall_list.hh
+++ b/paludis/dep_list/uninstall_list.hh
@@ -34,6 +34,12 @@ namespace paludis
class Environment;
+ /**
+ * Work out uninstall ordering for packages.
+ *
+ * \ingroup grpuninstalllist
+ * \nosubgrouping
+ */
class UninstallList :
private PrivateImplementationPattern<UninstallList>,
public InstantiationPolicy<UninstallList, instantiation_method::NonCopyableTag>
@@ -52,17 +58,37 @@ namespace paludis
std::tr1::shared_ptr<const ArbitrarilyOrderedPackageDatabaseEntryCollection> collect_world() const;
public:
+ ///\name Basic operations
+ ///\{
+
UninstallList(const Environment * const, const UninstallListOptions &);
virtual ~UninstallList();
+ ///\}
+
+ /**
+ * Our options.
+ */
UninstallListOptions & options;
+ /**
+ * Add a package, optionally with a reason.
+ */
void add(const PackageDatabaseEntry &, const PackageDatabaseEntry * const = 0);
+
+ /**
+ * Add any unused packages that are dependencies of packages to uninstall.
+ */
void add_unused();
+ ///\name Iterate over our items to remove
+ ///\{
+
typedef libwrapiter::ForwardIterator<UninstallList, const UninstallListEntry> Iterator;
Iterator begin() const;
Iterator end() const;
+
+ ///\}
};
}
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 4f2f0cc..6f1c3c0 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -250,6 +250,9 @@ namespace paludis
///\}
+ /**
+ * Change our text.
+ */
void set_text(const std::string &);
public:
diff --git a/paludis/environments/environment_maker.hh b/paludis/environments/environment_maker.hh
index 33d539f..1a81c24 100644
--- a/paludis/environments/environment_maker.hh
+++ b/paludis/environments/environment_maker.hh
@@ -49,7 +49,7 @@ namespace paludis
* Thrown if PALUDIS_ENVIRONMENT_SO_DIR is not a directory.
*
* \ingroup grpexceptions
- * \ingroup grprepository
+ * \ingroup grpenvironment
*/
class PALUDIS_VISIBLE PaludisEnvironmentSoDirNotADirectoryError :
public Exception
@@ -72,24 +72,42 @@ namespace paludis
mutable std::string _what;
public:
+ ///\name Basic operations
+ ///\{
+
PaludisEnvironmentSoDirCannotDlopenError(const std::string & file,
const std::string & e) throw ();
~PaludisEnvironmentSoDirCannotDlopenError() throw ();
+ ///\}
+
const char * what() const throw ();
};
+ /**
+ * If an EnvironmentMaker default call fails with an exception of this type,
+ * it is ok to fall back and try another maker.
+ *
+ * \ingroup grpenvironment
+ * \nosubgrouping
+ */
class FallBackToAnotherMakerError
{
protected:
+ ///\name Basic operations
+ ///\{
+
FallBackToAnotherMakerError();
+
+ ///\}
};
/**
* Virtual constructor for environments.
*
- * \ingroup grprepository
+ * \ingroup grpenvironment
+ * \nosubgrouping
*/
class PALUDIS_VISIBLE EnvironmentMaker :
public VirtualConstructor<std::string,
@@ -106,9 +124,33 @@ namespace paludis
void load_dir(const FSEntry &);
public:
+ ///\name Basic operations
+ ///\{
+
~EnvironmentMaker();
- std::tr1::shared_ptr<Environment> make_from_spec(const std::string &) const;
+ ///\}
+
+ /**
+ * Create an Environment subclass from the specified spec.
+ *
+ * \param spec The environment spec, which is in the form
+ * env:suffix, where env is the string representing an
+ * Environment's kind (e.g. "paludis", "portage") and
+ * suffix is the information to pass to the constructing
+ * function (for paludis, a config suffix, and for portage,
+ * a location). If env is not specified, it defaults to
+ * trying paludis then portage. If suffix is not specified,
+ * it defaults to an empty string. If no colon is present,
+ * the supplied string is taken as env (this includes an
+ * empty string).
+ *
+ * \throw NoSuchEnvironmentTypeError if an invalid environment type
+ * is specified.
+ * \see Environment
+ * \ingroup grpenvironment
+ */
+ std::tr1::shared_ptr<Environment> make_from_spec(const std::string & spec) const;
};
}
diff --git a/paludis/environments/no_config/no_config_environment.hh b/paludis/environments/no_config/no_config_environment.hh
index 2cc1318..b342149 100644
--- a/paludis/environments/no_config/no_config_environment.hh
+++ b/paludis/environments/no_config/no_config_environment.hh
@@ -78,10 +78,24 @@ namespace paludis
*/
void set_accept_unstable(const bool value);
+ /**
+ * Fetch our 'main' repository.
+ */
std::tr1::shared_ptr<Repository> main_repository();
+
+ /**
+ * Fetch our 'main' repository.
+ */
std::tr1::shared_ptr<const Repository> main_repository() const;
+ /**
+ * Fetch our 'master' repository (may be zero).
+ */
std::tr1::shared_ptr<Repository> master_repository();
+
+ /**
+ * Fetch our 'master' repository (may be zero).
+ */
std::tr1::shared_ptr<const Repository> master_repository() const;
virtual void force_use(std::tr1::shared_ptr<const PackageDepSpec>, const UseFlagName &,
diff --git a/paludis/environments/no_config/no_config_environment.sr b/paludis/environments/no_config/no_config_environment.sr
index 290d5e3..82127cb 100644
--- a/paludis/environments/no_config/no_config_environment.sr
+++ b/paludis/environments/no_config/no_config_environment.sr
@@ -9,5 +9,15 @@ make_class_NoConfigEnvironmentParams()
key repository_type NoConfigEnvironmentRepositoryType
key master_repository_dir "FSEntry"
allow_named_args
+
+ doxygen_comment << "END"
+ /**
+ * Parameters for a NoConfigEnvironment.
+ *
+ * \see NoConfigEnvironment
+ * \ingroup grpnoconfigenvironment
+ * \nosubgrouping
+ */
+END
}
diff --git a/paludis/environments/paludis/paludis_config.hh b/paludis/environments/paludis/paludis_config.hh
index a086d6c..ca1bf21 100644
--- a/paludis/environments/paludis/paludis_config.hh
+++ b/paludis/environments/paludis/paludis_config.hh
@@ -56,6 +56,7 @@ namespace paludis
*
* \ingroup grpexceptions
* \ingroup grppaludisconfig
+ * \nosubgrouping
*/
class PALUDIS_VISIBLE PaludisConfigError : public ConfigurationError
{
@@ -66,12 +67,24 @@ namespace paludis
PaludisConfigError(const std::string & msg) throw ();
};
+ /**
+ * Thrown if the config directory cannot be found by PaludisConfig.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppaludisconfig
+ * \nosubgrouping
+ */
class PALUDIS_VISIBLE PaludisConfigNoDirectoryError :
public PaludisConfigError,
public FallBackToAnotherMakerError
{
public:
+ ///\name Basic operations
+ ///\{
+
PaludisConfigNoDirectoryError(const std::string & msg) throw ();
+
+ ///\}
};
#include <paludis/environments/paludis/use_config_entry-sr.hh>
@@ -88,10 +101,15 @@ namespace paludis
private PrivateImplementationPattern<PaludisConfig>
{
public:
+ ///\name Basic operations
+ ///\{
+
PaludisConfig(PaludisEnvironment * const, const std::string & suffix);
~PaludisConfig();
+ ///\}
+
///\name Iterate over our repositories
///\{
@@ -222,6 +240,9 @@ namespace paludis
*/
std::string root() const;
+ /**
+ * Whether it's ok to unmask things that break Portage.
+ */
bool accept_breaks_portage() const;
///\name Userpriv
diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh
index b6400a8..27acb14 100644
--- a/paludis/environments/paludis/paludis_environment.hh
+++ b/paludis/environments/paludis/paludis_environment.hh
@@ -48,10 +48,15 @@ namespace paludis
std::tr1::shared_ptr<CompositeDepSpec> local_package_set(const SetName &) const;
public:
+ ///\name Basic operations
+ ///\{
+
PaludisEnvironment(const std::string &);
~PaludisEnvironment();
+ ///\}
+
virtual std::tr1::shared_ptr<const SetsCollection> sets_list() const;
virtual bool query_use(const UseFlagName &, const PackageDatabaseEntry *) const;
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index d917e9d..980bca9 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -24,13 +24,31 @@
namespace paludis
{
+ /**
+ * Thrown if a configuration error occurs in a PortageEnvironment.
+ *
+ * \ingroup grpportageenvironment
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class PortageEnvironmentConfigurationError :
public ConfigurationError
{
public:
+ ///\name Basic operations
+ ///\{
+
PortageEnvironmentConfigurationError(const std::string &) throw ();
+
+ ///\}
};
+ /**
+ * Environment using Portage-like configuration files.
+ *
+ * \ingroup grpportageenvironment
+ * \nosubgrouping
+ */
class PortageEnvironment :
public Environment,
private PrivateImplementationPattern<PortageEnvironment>
@@ -52,9 +70,14 @@ namespace paludis
void _load_atom_file(const FSEntry &, I_, const std::string &);
public:
+ ///\name Basic operations
+ ///\{
+
PortageEnvironment(const std::string &);
virtual ~PortageEnvironment();
+ ///\}
+
virtual bool query_use(const UseFlagName &, const PackageDatabaseEntry *) const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/hooker.hh b/paludis/hooker.hh
index e303921..a1c372a 100644
--- a/paludis/hooker.hh
+++ b/paludis/hooker.hh
@@ -29,15 +29,33 @@ namespace paludis
class Environment;
class Hook;
+ /**
+ * Handles executing hooks for an Environment.
+ *
+ * \ingroup grphooker
+ * \nosubgrouping
+ */
class Hooker :
private PrivateImplementationPattern<Hooker>,
private InstantiationPolicy<Hooker, instantiation_method::NonCopyableTag>
{
public:
+ ///\name Basic operations
+ ///\{
+
Hooker(const Environment * const) PALUDIS_ATTRIBUTE((nonnull(1)));
~Hooker();
- int perform_hook(const Hook &) const;
+ ///\}
+
+ /**
+ * Perform a hook, return the highest exit status.
+ */
+ int perform_hook(const Hook &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /**
+ * Add a new hook directory.
+ */
void add_dir(const FSEntry &, const bool output_prefixed);
};
}
diff --git a/paludis/host_tuple_name.hh b/paludis/host_tuple_name.hh
index 503a564..41e3027 100644
--- a/paludis/host_tuple_name.hh
+++ b/paludis/host_tuple_name.hh
@@ -48,13 +48,15 @@ namespace paludis
class HostTupleNameError : public NameError
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
HostTupleNameError(const std::string & name) throw ();
HostTupleNameError(const std::string & name,
const std::string & type) throw ();
+
+ ///\}
};
/**
diff --git a/paludis/merger/merger.hh b/paludis/merger/merger.hh
index 098f182..1902247 100644
--- a/paludis/merger/merger.hh
+++ b/paludis/merger/merger.hh
@@ -33,13 +33,32 @@ namespace paludis
#include <paludis/merger/merger-se.hh>
#include <paludis/merger/merger-sr.hh>
+ /**
+ * Thrown if an error occurs during a Merger operation.
+ *
+ * \ingroup grpmerger
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class MergerError :
public Exception
{
public:
+ ///\name Basic operations
+ ///\{
+
MergerError(const std::string & msg) throw ();
+
+ ///\}
};
+ /**
+ * Handles merging an image to a live filesystem.
+ *
+ * \ingroup grpmerger
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class Merger
{
private:
@@ -47,19 +66,46 @@ namespace paludis
bool _result;
protected:
+ ///\name Basic operations
+ ///\{
+
Merger(const MergerOptions &);
+ ///\}
+
+ /**
+ * When called, makes check()'s result a failure.
+ */
void make_check_fail();
+ /**
+ * Allows subclasses to extend hook calls.
+ */
virtual Hook extend_hook(const Hook &);
+ /**
+ * Determine the entry type of a filesystem entry.
+ */
virtual MergerEntryType entry_type(const FSEntry &);
+ /**
+ * Handle a directory, recursively.
+ */
virtual void do_dir_recursive(bool is_check, const FSEntry &, const FSEntry &);
+ /**
+ * Allows subclasses to perform behaviour when entering a directory.
+ */
virtual void on_enter_dir(bool is_check, const FSEntry);
+
+ /**
+ * Allows subclasses to perform behaviour when leaving a directory.
+ */
virtual void on_leave_dir(bool is_check, const FSEntry);
+ ///\name Handle filesystem entry things
+ ///\{
+
virtual void on_file(bool is_check, const FSEntry &, const FSEntry &);
virtual void on_file_over_nothing(bool is_check, const FSEntry &, const FSEntry &);
virtual void on_file_over_file(bool is_check, const FSEntry &, const FSEntry &);
@@ -96,16 +142,42 @@ namespace paludis
virtual void unlink_misc(FSEntry);
virtual void on_misc(bool is_check, const FSEntry &, const FSEntry &);
+ ///\}
+
+ /**
+ * What to do when an error occurs.
+ */
virtual void on_error(bool is_check, const std::string &) = 0;
+
+ /**
+ * What to do when a warning occurs.
+ */
virtual void on_warn(bool is_check, const std::string &) = 0;
+ ///\name Configuration protection
+ ///\{
+
virtual bool config_protected(const FSEntry &, const FSEntry &) = 0;
virtual std::string make_config_protect_name(const FSEntry &, const FSEntry &) = 0;
+ ///\}
+
public:
+ ///\name Basic operations
+ ///\{
+
virtual ~Merger();
+ ///\}
+
+ /**
+ * Check a merge, return whether no errors were encountered.
+ */
virtual bool check() PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ /**
+ * Perform the merge.
+ */
virtual void merge();
};
diff --git a/paludis/merger/unmerger.hh b/paludis/merger/unmerger.hh
index 2aff8a4..ec68b67 100644
--- a/paludis/merger/unmerger.hh
+++ b/paludis/merger/unmerger.hh
@@ -31,30 +31,66 @@ namespace paludis
#include <paludis/merger/unmerger-sr.hh>
+ /**
+ * Thrown if an error occurs during an unmerge.
+ *
+ * \ingroup grpunmerger
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class UnmergerError :
public Exception
{
public:
+ ///\name Basic operations
+ ///\{
+
UnmergerError(const std::string & msg) throw ();
+
+ ///\}
};
+ /**
+ * Handles unmerging items.
+ *
+ * \ingroup grpunmerger
+ * \nosubgrouping
+ */
class Unmerger
{
private:
UnmergerOptions _options;
protected:
+ ///\name Basic operations
+ ///\{
+
Unmerger(const UnmergerOptions &);
+ ///\}
+
+ /**
+ * Extend a hook with extra options.
+ */
virtual Hook extend_hook(const Hook &);
+ ///\name Unlink operations
+ ///\{
+
virtual void unlink_file(FSEntry);
virtual void unlink_dir(FSEntry);
virtual void unlink_sym(FSEntry);
virtual void unlink_misc(FSEntry);
+ ///\}
+
public:
+ ///\name Basic operations
+ ///\{
+
virtual ~Unmerger();
+
+ ///\}
};
}
diff --git a/paludis/name.hh b/paludis/name.hh
index a8b4f68..ffa833a 100644
--- a/paludis/name.hh
+++ b/paludis/name.hh
@@ -315,6 +315,9 @@ namespace paludis
*/
struct RepositoryNameComparator
{
+ /**
+ * Perform the comparison.
+ */
bool operator() (const RepositoryName & lhs, const RepositoryName & rhs) const
{
return lhs.data() < rhs.data();
diff --git a/paludis/package_database.hh b/paludis/package_database.hh
index 79f485e..a5f2b20 100644
--- a/paludis/package_database.hh
+++ b/paludis/package_database.hh
@@ -193,6 +193,9 @@ namespace paludis
const RepositoryName _name;
public:
+ ///\name Basic operations
+ ///\{
+
/**
* Constructor.
*
@@ -200,13 +203,15 @@ namespace paludis
*/
NoSuchRepositoryError(const std::string &) throw () PALUDIS_ATTRIBUTE((deprecated));
- /**
- * Constructor.
- */
NoSuchRepositoryError(const RepositoryName &) throw ();
~NoSuchRepositoryError() throw ();
+ ///\}
+
+ /**
+ * The name of our repository.
+ */
RepositoryName name() const;
};
diff --git a/paludis/package_database_entry.hh b/paludis/package_database_entry.hh
index 8efe7db..0d31662 100644
--- a/paludis/package_database_entry.hh
+++ b/paludis/package_database_entry.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2005, 2006, 2007 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
@@ -42,6 +42,9 @@ namespace paludis
*/
struct ArbitrarilyOrderedPackageDatabaseEntryCollectionComparator
{
+ /**
+ * Perform the comparison.
+ */
bool operator () (const PackageDatabaseEntry & lhs, const PackageDatabaseEntry & rhs) const;
};
diff --git a/paludis/portage_dep_parser.hh b/paludis/portage_dep_parser.hh
index fd346e2..000ab84 100644
--- a/paludis/portage_dep_parser.hh
+++ b/paludis/portage_dep_parser.hh
@@ -105,6 +105,12 @@ namespace paludis
private InstantiationPolicy<PortageDepParser, instantiation_method::NonInstantiableTag>
{
public:
+ /**
+ * Controls how a PortageDepParser treats any and text groups.
+ *
+ * \see PortageDepParser
+ * \ingroup grpdepparser
+ */
class Policy
{
private:
@@ -119,10 +125,26 @@ namespace paludis
std::tr1::shared_ptr<StringDepSpec> (Policy::* const) (const std::string &) const);
public:
+ /**
+ * Return a Policy object that makes text specs
+ * PlainTextDepSpec instances.
+ */
static Policy text_is_text_dep_spec(bool permit_any_deps);
+
+ /**
+ * Return a Policy object that makes text specs
+ * PackageDepSpec instances.
+ */
static Policy text_is_package_dep_spec(bool permit_any_deps, PackageDepSpecParseMode);
+ /**
+ * Create a text dep spec.
+ */
std::tr1::shared_ptr<StringDepSpec> create(const std::string &) const;
+
+ /**
+ * Whether any deps are permitted.
+ */
bool permit_any_deps() const;
};
diff --git a/paludis/qa/broken_global_variables_check.hh b/paludis/qa/broken_global_variables_check.hh
index 81b2b1c..0e3b872 100644
--- a/paludis/qa/broken_global_variables_check.hh
+++ b/paludis/qa/broken_global_variables_check.hh
@@ -37,10 +37,19 @@ namespace paludis
public:
BrokenGlobalVariablesCheck();
+ /**
+ * Perform the check.
+ */
CheckResult operator() (const FSEntry &) const;
+ /**
+ * Fetch the check's identifier.
+ */
static const std::string & identifier();
+ /**
+ * Describe the check.
+ */
virtual std::string describe() const
{
return "Checks for abuse of pkg_setup variables in globals";
diff --git a/paludis/qa/check.hh b/paludis/qa/check.hh
index 3cea426..33d6790 100644
--- a/paludis/qa/check.hh
+++ b/paludis/qa/check.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 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
@@ -49,6 +49,9 @@ namespace paludis
public:
virtual std::string describe() const = 0;
+ /**
+ * Return whether the check is important.
+ */
virtual bool is_important() const
{
return false;
diff --git a/paludis/qa/ebuild_check.sr b/paludis/qa/ebuild_check.sr
index 911f56c..19bb8b1 100644
--- a/paludis/qa/ebuild_check.sr
+++ b/paludis/qa/ebuild_check.sr
@@ -6,5 +6,15 @@ make_class_EbuildCheckData()
key name QualifiedPackageName
key version VersionSpec
key environment "const QAEnvironment *"
+
+ doxygen_comment << "END"
+ /**
+ * Data for an EbuildCheck.
+ *
+ * \see EbuildCheck
+ * \ingroup grpqa
+ * \nosubgrouping
+ */
+END
}
diff --git a/paludis/qa/per_profile_ebuild_check.sr b/paludis/qa/per_profile_ebuild_check.sr
index 123a305..03de3ea 100644
--- a/paludis/qa/per_profile_ebuild_check.sr
+++ b/paludis/qa/per_profile_ebuild_check.sr
@@ -9,5 +9,15 @@ make_class_PerProfileEbuildCheckData()
key profile FSEntry
allow_named_args
+
+ doxygen_comment << "END"
+ /**
+ * Parameters for a PerProfileEbuildCheck.
+ *
+ * \ingroup grpqa
+ * \see PerProfileEbuildCheck
+ * \nosubgrouping
+ */
+END
}
diff --git a/paludis/qa/profile_check.sr b/paludis/qa/profile_check.sr
index b0a1b0b..a807f2d 100644
--- a/paludis/qa/profile_check.sr
+++ b/paludis/qa/profile_check.sr
@@ -7,6 +7,16 @@ make_class_ProfileCheckData()
key profiles_desc_line RepositoryPortageInterface::ProfilesDescLine
allow_named_args
+
+ doxygen_comment << "END"
+ /**
+ * Parameters for a ProfileCheck.
+ *
+ * \see ProfileCheck
+ * \ingroup grpqa
+ * \nosubgrouping
+ */
+END
}
diff --git a/paludis/qa/qa_environment.sr b/paludis/qa/qa_environment.sr
index 13cfe53..42d8482 100644
--- a/paludis/qa/qa_environment.sr
+++ b/paludis/qa/qa_environment.sr
@@ -9,6 +9,15 @@ make_class_PackageDatabasesEntry()
key package_database "std::tr1::shared_ptr<PackageDatabase>"
allow_named_args
+
+ doxygen_comment << "END"
+ /**
+ * Internal use by QAEnvironment: our package databases.
+ *
+ * \nosubgrouping
+ * \ingroup grpqa
+ */
+END
}
diff --git a/paludis/query.hh b/paludis/query.hh
index f5c2aab..e00124a 100644
--- a/paludis/query.hh
+++ b/paludis/query.hh
@@ -24,34 +24,92 @@
#include <paludis/name.hh>
#include <paludis/package_database_entry.hh>
+/** \file
+ * Query and related classes.
+ *
+ * \ingroup grpquery
+ */
+
namespace paludis
{
class Environment;
class PackageDepSpec;
class FSEntry;
+ /**
+ * A QueryDelegate subclass is used by Query to provide the information
+ * needed by PackageDatabase::query.
+ *
+ * \see Query
+ * \ingroup grpquery
+ */
class QueryDelegate
{
protected:
+ ///\name Basic operations
+ ///\{
+
QueryDelegate();
public:
virtual ~QueryDelegate();
+ ///\}
+
+ /**
+ * Fetch the names of repositories potentially containing matches.
+ * All returned repositories must exist.
+ *
+ * Default behaviour: return all repositories.
+ */
virtual std::tr1::shared_ptr<RepositoryNameCollection> repositories(const Environment &) const;
+ /**
+ * Fetch the names of categories potentially containing matches.
+ *
+ * Default behaviour: return all categories in the provided
+ * repository collection.
+ */
virtual std::tr1::shared_ptr<CategoryNamePartCollection> categories(const Environment &,
std::tr1::shared_ptr<const RepositoryNameCollection>) const;
+ /**
+ * Fetch the names of packages potentially containing matches.
+ *
+ * Default behaviour: return all packages in the provided repository
+ * in the provided categories.
+ *
+ * Note that some entries in the categories collection (but not in
+ * the repositories collection) may not exist.
+ */
virtual std::tr1::shared_ptr<QualifiedPackageNameCollection> packages(const Environment &,
std::tr1::shared_ptr<const RepositoryNameCollection>,
std::tr1::shared_ptr<const CategoryNamePartCollection>) const;
+ /**
+ * Fetch the versions of matching packages.
+ *
+ * Default behaviour: return all versions in the provided packages.
+ *
+ * Note that some entries in the qualified package name collection
+ * (but not in the repositories collection) may not exist.
+ */
virtual std::tr1::shared_ptr<PackageDatabaseEntryCollection> versions(const Environment &,
std::tr1::shared_ptr<const RepositoryNameCollection>,
std::tr1::shared_ptr<const QualifiedPackageNameCollection>) const;
};
+ /**
+ * Parameter for a PackageDatabase query.
+ *
+ * Holds a QueryDelegate to perform actual operations, so that it can be
+ * copied without splicing problems.
+ *
+ * \see QueryDelegate
+ * \see PackageDatabase::query
+ * \ingroup grpquery
+ * \nosubgrouping
+ */
class Query
{
friend Query operator& (const Query &, const Query &);
@@ -60,11 +118,19 @@ namespace paludis
std::tr1::shared_ptr<const QueryDelegate> _d;
protected:
+ ///\name Basic operations
+ ///\{
+
Query(std::tr1::shared_ptr<const QueryDelegate>);
public:
~Query();
+ ///\}
+
+ ///\name Delegate-implemented functions
+ ///\{
+
std::tr1::shared_ptr<RepositoryNameCollection> repositories(const Environment & e) const
{
return _d->repositories(e);
@@ -89,60 +155,170 @@ namespace paludis
{
return _d->versions(e, r, q);
}
+
+ ///\}
};
+ /**
+ * Various Query classes.
+ *
+ * \see Query
+ * \ingroup grpquery
+ */
namespace query
{
+ /**
+ * Fetch packages matching a given PackageDepSpec.
+ *
+ * \see Query
+ * \see PackageDatabase::query
+ * \ingroup grpquery
+ * \nosubgrouping
+ */
class Matches :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
Matches(const PackageDepSpec &);
+
+ ///\}
};
+ /**
+ * Fetch packages with a given package name.
+ *
+ * \see Query
+ * \see PackageData
+ * \ingroup grpquerybase::query
+ * \nosubgrouping
+ */
class Package :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
Package(const QualifiedPackageName &);
+
+ ///\}
};
+ /**
+ * Fetch packages that are not masked.
+ *
+ * \see Query
+ * \see PackageData
+ * \ingroup grpquerybase::query
+ * \nosubgrouping
+ */
class NotMasked :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
NotMasked();
+
+ ///\}
};
+ /**
+ * Fetch packages from a repository that has
+ * RepositoryInstalledInterface.
+ *
+ * \see Query
+ * \see PackageData
+ * \ingroup grpquerybase::query
+ * \nosubgrouping
+ */
class RepositoryHasInstalledInterface :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
RepositoryHasInstalledInterface();
+
+ ///\}
};
+ /**
+ * Fetch packages from a repository that has
+ * RepositoryInstallableInterface.
+ *
+ * \see PackageDatabase::query
+ * \see Query
+ * \ingroup grpquery
+ * \nosubgrouping
+ */
class RepositoryHasInstallableInterface :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
RepositoryHasInstallableInterface();
+
+ ///\}
};
+ /**
+ * Fetch packages from a repository that has
+ * RepositoryUninstallableInterface.
+ *
+ * \see PackageDatabase::query
+ * \see Query
+ * \ingroup grpquery
+ * \nosubgrouping
+ */
class RepositoryHasUninstallableInterface :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
RepositoryHasUninstallableInterface();
+
+ ///\}
};
+ /**
+ * Fetch packages that are installed at a particular root.
+ *
+ * \see Query
+ * \see PackageDatabase::query
+ * \ingroup grpquery
+ * \nosubgrouping
+ */
class InstalledAtRoot :
public Query
{
public:
+ ///\name Basic operations
+ ///\{
+
InstalledAtRoot(const FSEntry &);
+
+ ///}
};
}
+ /**
+ * Create a Query that returns packages for which both Query parameters
+ * hold.
+ *
+ * \see Query
+ * \see PackageDatabase::query
+ * \ingroup grpquery
+ */
Query operator& (const Query &, const Query &);
}
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 083e3e7..a238794 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -511,12 +511,6 @@ CRANInstalledRepositoryConfigurationError::CRANInstalledRepositoryConfigurationE
{
}
-bool
-CRANInstalledRepository::do_is_licence(const std::string &) const
-{
- return false;
-}
-
void
CRANInstalledRepository::do_uninstall(const QualifiedPackageName & q, const VersionSpec & v,
const UninstallOptions &) const
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index dc9ade9..5dbda46 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -81,8 +81,6 @@ namespace paludis
const QualifiedPackageName &,
const VersionSpec &) const;
- virtual bool do_is_licence(const std::string &) const;
-
virtual void do_uninstall(const QualifiedPackageName &, const VersionSpec &,
const UninstallOptions &) const;
@@ -90,7 +88,14 @@ namespace paludis
virtual std::tr1::shared_ptr<const SetsCollection> sets_list() const;
+ /**
+ * Add a string to world.
+ */
virtual void add_string_to_world(const std::string &) const;
+
+ /**
+ * Remove a string from world.
+ */
virtual void remove_string_from_world(const std::string &) const;
public:
diff --git a/paludis/repositories/cran/cran_version_metadata.hh b/paludis/repositories/cran/cran_version_metadata.hh
index 24eabeb..77c0591 100644
--- a/paludis/repositories/cran/cran_version_metadata.hh
+++ b/paludis/repositories/cran/cran_version_metadata.hh
@@ -24,6 +24,12 @@
namespace paludis
{
+ /**
+ * VersionMetadata for a CRAN package.
+ *
+ * \ingroup grpcranrepository
+ * \nosubgrouping
+ */
class CRANVersionMetadata :
public VersionMetadata,
public VersionMetadataCRANInterface,
@@ -32,9 +38,14 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
CRANVersionMetadata(bool want_origins);
virtual ~CRANVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
diff --git a/paludis/repositories/fake/fake_installed_repository.hh b/paludis/repositories/fake/fake_installed_repository.hh
index da61d59..f9e6cae 100644
--- a/paludis/repositories/fake/fake_installed_repository.hh
+++ b/paludis/repositories/fake/fake_installed_repository.hh
@@ -42,8 +42,13 @@ namespace paludis
const RepositoryProvidesEntry &) const;
public:
+ ///\name Basic operations
+ ///\{
+
FakeInstalledRepository(const Environment * const, const RepositoryName &);
+ ///\}
+
bool is_suitable_destination_for(const PackageDatabaseEntry &) const;
bool is_default_destination() const;
bool want_pre_post_phases() const;
diff --git a/paludis/repositories/fake/fake_repository.hh b/paludis/repositories/fake/fake_repository.hh
index 4479a49..b050a35 100644
--- a/paludis/repositories/fake/fake_repository.hh
+++ b/paludis/repositories/fake/fake_repository.hh
@@ -47,8 +47,16 @@ namespace paludis
const RepositoryVirtualsEntry &, const VersionSpec & v) const;
public:
+ ///\name Basic operations
+ ///\{
+
FakeRepository(const Environment * const, const RepositoryName &);
+ ///\}
+
+ /**
+ * Add a virtual package.
+ */
void add_virtual_package(const QualifiedPackageName &, std::tr1::shared_ptr<const PackageDepSpec>);
};
}
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 2169f24..157f51b 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -223,12 +223,6 @@ FakeRepositoryBase::do_arch_flags() const
return std::tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
}
-bool
-FakeRepositoryBase::do_is_licence(const std::string &) const
-{
- return false;
-}
-
void
FakeRepositoryBase::invalidate()
{
@@ -252,18 +246,6 @@ FakeRepositoryBase::do_use_expand_prefixes() const
return std::tr1::shared_ptr<const UseFlagNameCollection>(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;
-}
-
void
FakeRepositoryBase::add_package_set(const SetName & n, std::tr1::shared_ptr<DepSpec> s)
{
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index ad8c9ca..4a788d1 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -70,9 +70,14 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
FakeVirtualVersionMetadata(const SlotName &, const PackageDatabaseEntry &);
virtual ~FakeVirtualVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
@@ -104,8 +109,6 @@ namespace paludis
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> 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;
virtual std::string do_describe_use_flag(const UseFlagName &,
const PackageDatabaseEntry * const) const;
@@ -136,8 +139,6 @@ namespace paludis
virtual bool do_query_profile_masks(const QualifiedPackageName &,
const VersionSpec &) const;
- virtual bool do_is_licence(const std::string &) const;
-
virtual std::tr1::shared_ptr<DepSpec> do_package_set(const SetName & id) const;
virtual std::tr1::shared_ptr<const SetsCollection> sets_list() const;
@@ -190,6 +191,9 @@ namespace paludis
virtual void invalidate();
+ /**
+ * Fetch our associated environment.
+ */
const Environment * environment() const;
};
}
diff --git a/paludis/repositories/gentoo/ebin.hh b/paludis/repositories/gentoo/ebin.hh
index f59c1f4..1455135 100644
--- a/paludis/repositories/gentoo/ebin.hh
+++ b/paludis/repositories/gentoo/ebin.hh
@@ -34,6 +34,12 @@ namespace paludis
#include <paludis/repositories/gentoo/ebin-se.hh>
#include <paludis/repositories/gentoo/ebin-sr.hh>
+ /**
+ * Version metadata for a .ebin file.
+ *
+ * \ingroup grpebininterface
+ * \nosubgrouping
+ */
class EbinVersionMetadata :
public VersionMetadata,
public VersionMetadataEbuildInterface,
@@ -44,41 +50,107 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
EbinVersionMetadata(const SlotName &);
virtual ~EbinVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
}
};
+ /**
+ * A command related to a .ebin file.
+ *
+ * \ingroup grpebininterface
+ * \nosubgrouping
+ */
class EbinCommand :
private InstantiationPolicy<EbinCommand, instantiation_method::NonCopyableTag>
{
protected:
+ /**
+ * Our parameters.
+ */
EbinCommandParams params;
+ ///\name Basic operations
+ ///\{
+
EbinCommand(const EbinCommandParams &);
+ ///\}
+
+ ///\name Command options
+ ///\{
+
+ /**
+ * What commands should be run?
+ */
virtual std::string commands() const = 0;
+
+ /**
+ * Was our execution a success?
+ */
virtual bool success();
+
+ /**
+ * Should we use sandbox?
+ */
virtual bool use_sandbox() const;
+
+ /**
+ * Handle a failure.
+ */
virtual bool failure() = 0;
+
+ /**
+ * Run the command specified.
+ */
virtual bool do_run_command(const Command &);
+
+ /**
+ * Extend the basic command.
+ */
virtual Command extend_command(const Command &) = 0;
+
+ /**
+ * Add Portage emulation variables.
+ */
virtual Command add_portage_vars(const Command &) const;
+ ///\}
+
public:
+ ///\name Basic operations
+ ///\{
+
virtual ~EbinCommand();
+ ///\}
+
+ /**
+ * Run the command.
+ */
virtual bool operator() ();
};
+ /**
+ * Fetch a .ebin's bin_uri contents.
+ *
+ * \ingroup grpebininterface
+ * \nosubgrouping
+ */
class EbinFetchCommand :
public EbinCommand
{
protected:
+ /// Our parameters.
const EbinFetchCommandParams fetch_params;
virtual std::string commands() const;
@@ -88,13 +160,25 @@ namespace paludis
virtual Command extend_command(const Command &);
public:
+ ///\name Basic operations
+ ///\{
+
EbinFetchCommand(const EbinCommandParams &, const EbinFetchCommandParams &);
+
+ ///\}
};
+ /**
+ * Perform a part of a .ebin install sequence.
+ *
+ * \ingroup grpebininterface
+ * \nosubgrouping
+ */
class EbinInstallCommand :
public EbinCommand
{
protected:
+ /// Our parameters.
const EbinInstallCommandParams install_params;
virtual std::string commands() const;
@@ -104,18 +188,42 @@ namespace paludis
virtual Command extend_command(const Command &);
public:
+ ///\name Basic operations
+ ///\{
+
EbinInstallCommand(const EbinCommandParams &, const EbinInstallCommandParams &);
+
+ ///\}
};
+ /**
+ * Merge to a .ebin repository.
+ *
+ * \ingroup grpebininterface
+ * \nosubgrouping
+ */
class EbinMergeCommand
{
protected:
+ ///\name Parameters
+ ///\{
+
const EbinCommandParams params;
const EbinMergeCommandParams merge_params;
+ ///\}
+
public:
+ ///\name Basic operations
+ ///\{
+
EbinMergeCommand(const EbinCommandParams &, const EbinMergeCommandParams &);
+ ///\}
+
+ /**
+ * Perform the merge.
+ */
void operator() ();
};
}
diff --git a/paludis/repositories/gentoo/ebin_entries.hh b/paludis/repositories/gentoo/ebin_entries.hh
index 1679b78..b1c2ffe 100644
--- a/paludis/repositories/gentoo/ebin_entries.hh
+++ b/paludis/repositories/gentoo/ebin_entries.hh
@@ -39,9 +39,14 @@ namespace paludis
private PrivateImplementationPattern<EbinEntries>
{
public:
- static std::tr1::shared_ptr<PortageRepositoryEntries>
- make_ebin_entries(const Environment * const,
- PortageRepository * const, const PortageRepositoryParams &);
+ /**
+ * Create an EbinEntries instance.
+ */
+ static std::tr1::shared_ptr<PortageRepositoryEntries> make_ebin_entries(const Environment * const,
+ PortageRepository * const, const PortageRepositoryParams &);
+
+ ///\name Basic operations
+ ///\{
EbinEntries(const Environment * const,
PortageRepository * const portage_repository,
@@ -49,6 +54,8 @@ namespace paludis
virtual ~EbinEntries();
+ ///\}
+
virtual std::tr1::shared_ptr<VersionMetadata> generate_version_metadata(const QualifiedPackageName &,
const VersionSpec &) const;
diff --git a/paludis/repositories/gentoo/ebuild.hh b/paludis/repositories/gentoo/ebuild.hh
index f775a7f..23c5a42 100644
--- a/paludis/repositories/gentoo/ebuild.hh
+++ b/paludis/repositories/gentoo/ebuild.hh
@@ -61,6 +61,12 @@ namespace paludis
#include <paludis/repositories/gentoo/ebuild-se.hh>
#include <paludis/repositories/gentoo/ebuild-sr.hh>
+ /**
+ * VersionMetadata for an ebuild.
+ *
+ * \ingroup grpebuildinterface
+ * \nosubgrouping
+ */
class EbuildVersionMetadata :
public VersionMetadata,
public VersionMetadataEbuildInterface,
@@ -69,9 +75,14 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
EbuildVersionMetadata();
virtual ~EbuildVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
@@ -358,6 +369,11 @@ namespace paludis
void operator() ();
};
+ /**
+ * Command to be run after a VDB merge.
+ *
+ * \ingroup grpebuildinterface
+ */
class VDBPostMergeCommand :
private InstantiationPolicy<VDBPostMergeCommand, instantiation_method::NonCopyableTag>
{
@@ -365,11 +381,13 @@ namespace paludis
const VDBPostMergeCommandParams params;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
VDBPostMergeCommand(const VDBPostMergeCommandParams &);
+ ///\}
+
/**
* Run the command.
*/
diff --git a/paludis/repositories/gentoo/ebuild.sr b/paludis/repositories/gentoo/ebuild.sr
index ba8ad2b..053cef0 100644
--- a/paludis/repositories/gentoo/ebuild.sr
+++ b/paludis/repositories/gentoo/ebuild.sr
@@ -130,6 +130,16 @@ make_class_WriteVDBEntryParams()
key output_directory "FSEntry"
key environment_file "FSEntry"
+ doxygen_comment << "END"
+ /**
+ * Parameters for writing a VDB entry.
+ *
+ * \see WriteVDBEntryCommand
+ * \ingroup grpebuildinterface
+ * \nosubgrouping
+ */
+END
+
allow_named_args
}
@@ -137,6 +147,16 @@ make_class_VDBPostMergeCommandParams()
{
key root "FSEntry"
+ doxygen_comment << "END"
+ /**
+ * Parameters for a VDBPostMergeCommand.
+ *
+ * \see VDBPostMergeCommand
+ * \ingroup grpebuildinterface
+ * \nosubgrouping
+ */
+END
+
allow_named_args
}
diff --git a/paludis/repositories/gentoo/ebuild_entries.hh b/paludis/repositories/gentoo/ebuild_entries.hh
index 6e50034..4e51f0f 100644
--- a/paludis/repositories/gentoo/ebuild_entries.hh
+++ b/paludis/repositories/gentoo/ebuild_entries.hh
@@ -45,16 +45,23 @@ namespace paludis
private PrivateImplementationPattern<EbuildEntries>
{
public:
- static std::tr1::shared_ptr<PortageRepositoryEntries>
- make_ebuild_entries(const Environment * const,
+ /**
+ * Create an EbuildEntries instance.
+ */
+ static std::tr1::shared_ptr<PortageRepositoryEntries> make_ebuild_entries(const Environment * const,
PortageRepository * const, const PortageRepositoryParams &);
+ ///\name Basic operations
+ ///\{
+
EbuildEntries(const Environment * const,
PortageRepository * const portage_repository,
const PortageRepositoryParams &);
virtual ~EbuildEntries();
+ ///\}
+
virtual std::tr1::shared_ptr<VersionMetadata> generate_version_metadata(const QualifiedPackageName &,
const VersionSpec &) const;
diff --git a/paludis/repositories/gentoo/glsa.hh b/paludis/repositories/gentoo/glsa.hh
index 69e7a57..16a0a0c 100644
--- a/paludis/repositories/gentoo/glsa.hh
+++ b/paludis/repositories/gentoo/glsa.hh
@@ -63,22 +63,52 @@ namespace paludis
private PrivateImplementationPattern<GLSAPackage>
{
public:
+ ///\name Basic operations
+ ///\{
+
GLSAPackage(const QualifiedPackageName & name);
~GLSAPackage();
+ ///\}
+
+ ///\name Iterate over our archs.
+ ///\{
+
typedef libwrapiter::ForwardIterator<GLSAPackage, const UseFlagName> ArchsIterator;
ArchsIterator begin_archs() const;
ArchsIterator end_archs() const;
+
+ ///\}
+
+ /**
+ * Add an arch.
+ */
void add_arch(const UseFlagName &);
+ ///\name Iterate over our ranges.
+ ///\{
+
typedef libwrapiter::ForwardIterator<GLSAPackage, const GLSARange> RangesIterator;
RangesIterator begin_unaffected() const;
RangesIterator end_unaffected() const;
RangesIterator begin_vulnerable() const;
RangesIterator end_vulnerable() const;
+
+ ///\}
+
+ /**
+ * Add an unaffected package.
+ */
void add_unaffected(const GLSARange &);
+
+ /**
+ * Add a vulnerable package.
+ */
void add_vulnerable(const GLSARange &);
+ /**
+ * Our package's name.
+ */
QualifiedPackageName name() const;
};
@@ -92,20 +122,51 @@ namespace paludis
private PrivateImplementationPattern<GLSA>
{
public:
+ ///\name Basic operations
+ ///\{
+
GLSA();
~GLSA();
+ ///\}
+
+ /**
+ * Create a GLSA from an XML file.
+ */
static std::tr1::shared_ptr<GLSA> create_from_xml_file(const std::string & filename);
+ ///\name Iterate over our packages.
+ ///\{
+
typedef libwrapiter::ForwardIterator<GLSA, const GLSAPackage> PackagesIterator;
PackagesIterator begin_packages() const;
PackagesIterator end_packages() const;
+
+ ///\}
+
+ /**
+ * Add a package.
+ */
void add_package(std::tr1::shared_ptr<const GLSAPackage>);
+ /**
+ * Set our ID.
+ */
void set_id(const std::string &);
+
+ /**
+ * Fetch our ID.
+ */
std::string id() const;
+ /**
+ * Set our title.
+ */
void set_title(const std::string &);
+
+ /**
+ * Fetch our title.
+ */
std::string title() const;
};
}
diff --git a/paludis/repositories/gentoo/glsa.sr b/paludis/repositories/gentoo/glsa.sr
index 359ffee..6405c7f 100644
--- a/paludis/repositories/gentoo/glsa.sr
+++ b/paludis/repositories/gentoo/glsa.sr
@@ -1,8 +1,17 @@
make_class_GLSARange()
{
- key op std::string;
+ key op std::string
# not a version, may be something like 1.3*
- key version std::string;
+ key version std::string
- allow_named_args;
+ allow_named_args
+
+ doxygen_comment << "END"
+ /**
+ * A version range in a GLSA.
+ *
+ * \see PortageRepositorySets
+ * \ingroup grpportagerepository
+ */
+END
}
diff --git a/paludis/repositories/gentoo/make_ebin_repository.hh b/paludis/repositories/gentoo/make_ebin_repository.hh
index 3fd67d1..41d38a2 100644
--- a/paludis/repositories/gentoo/make_ebin_repository.hh
+++ b/paludis/repositories/gentoo/make_ebin_repository.hh
@@ -35,6 +35,12 @@ namespace paludis
Environment * const,
std::tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >) PALUDIS_VISIBLE;
+ /**
+ * Create an ebin format repository (wrapper for our virtual constructor).
+ *
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ */
std::tr1::shared_ptr<Repository>
make_ebin_repository_wrapped(
Environment * const env,
diff --git a/paludis/repositories/gentoo/make_ebuild_repository.hh b/paludis/repositories/gentoo/make_ebuild_repository.hh
index d3c7713..2e26850 100644
--- a/paludis/repositories/gentoo/make_ebuild_repository.hh
+++ b/paludis/repositories/gentoo/make_ebuild_repository.hh
@@ -35,6 +35,12 @@ namespace paludis
Environment * const,
std::tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >) PALUDIS_VISIBLE;
+ /**
+ * Create an ebuild format repository (wrapper for our virtual constructor).
+ *
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ */
std::tr1::shared_ptr<Repository>
make_ebuild_repository_wrapped(
Environment * const env,
diff --git a/paludis/repositories/gentoo/portage_repository.cc b/paludis/repositories/gentoo/portage_repository.cc
index cecd762..17c448d 100644
--- a/paludis/repositories/gentoo/portage_repository.cc
+++ b/paludis/repositories/gentoo/portage_repository.cc
@@ -1131,36 +1131,6 @@ PortageRepository::do_use_expand_hidden_prefixes() const
return result;
}
-UseFlagName
-PortageRepository::do_use_expand_name(const UseFlagName & u) const
-{
- for (PortageRepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
- i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
- {
- std::string lower_i;
- std::transform(i->data().begin(), i->data().end(), std::back_inserter(lower_i), ::tolower);
- if (0 == lower_i.compare(0, lower_i.length(), stringify(u), 0, lower_i.length()))
- return *i;
- }
-
- throw InternalError(PALUDIS_HERE, "Not a use expand name: '" + stringify(u) + "'");
-}
-
-UseFlagName
-PortageRepository::do_use_expand_value(const UseFlagName & u) const
-{
- for (PortageRepositoryProfile::UseExpandIterator i(_imp->profile_ptr->begin_use_expand()),
- i_end(_imp->profile_ptr->end_use_expand()) ; i != i_end ; ++i)
- {
- std::string lower_i;
- std::transform(i->data().begin(), i->data().end(), std::back_inserter(lower_i), ::tolower);
- if (0 == lower_i.compare(0, lower_i.length(), stringify(u), 0, lower_i.length()))
- return UseFlagName(stringify(u).substr(lower_i.length() + 1));
- }
-
- throw InternalError(PALUDIS_HERE, "Not a use expand name: '" + stringify(u) + "'");
-}
-
void
PortageRepository::regenerate_cache() const
{
diff --git a/paludis/repositories/gentoo/portage_repository.hh b/paludis/repositories/gentoo/portage_repository.hh
index 1008092..5c1eb32 100644
--- a/paludis/repositories/gentoo/portage_repository.hh
+++ b/paludis/repositories/gentoo/portage_repository.hh
@@ -127,8 +127,6 @@ namespace paludis
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_arch_flags() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const;
- virtual UseFlagName do_use_expand_name(const UseFlagName & u) const;
- virtual UseFlagName do_use_expand_value(const UseFlagName & u) const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_prefixes() const;
virtual std::string do_describe_use_flag(const UseFlagName &,
const PackageDatabaseEntry * const) const;
@@ -164,8 +162,10 @@ namespace paludis
const PackageDatabaseEntry & for_package,
const std::string & var) const;
- virtual MirrorsIterator begin_mirrors(const std::string & s) const;
- virtual MirrorsIterator end_mirrors(const std::string & s) const;
+ virtual MirrorsIterator begin_mirrors(const std::string & s) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+ virtual MirrorsIterator end_mirrors(const std::string & s) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
///\name Information about PortageRepository
///\{
@@ -191,6 +191,9 @@ namespace paludis
int perform_hook(const Hook &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ /**
+ * Update GLEP 42 news files.
+ */
void update_news() const;
};
diff --git a/paludis/repositories/gentoo/portage_repository_entries.hh b/paludis/repositories/gentoo/portage_repository_entries.hh
index d9cf0da..6b8105d 100644
--- a/paludis/repositories/gentoo/portage_repository_entries.hh
+++ b/paludis/repositories/gentoo/portage_repository_entries.hh
@@ -90,9 +90,15 @@ namespace paludis
const VersionSpec &, const std::string & var,
std::tr1::shared_ptr<const PortageRepositoryProfile>) const = 0;
+ /**
+ * Handle an install.
+ */
virtual void install(const QualifiedPackageName &, const VersionSpec &,
const InstallOptions &, std::tr1::shared_ptr<const PortageRepositoryProfile>) const = 0;
+ /**
+ * Handle a merge.
+ */
virtual void merge(const MergeOptions &) = 0;
};
diff --git a/paludis/repositories/gentoo/portage_repository_profile_file.hh b/paludis/repositories/gentoo/portage_repository_profile_file.hh
index baa6552..89a59eb 100644
--- a/paludis/repositories/gentoo/portage_repository_profile_file.hh
+++ b/paludis/repositories/gentoo/portage_repository_profile_file.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 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
@@ -38,14 +38,27 @@ namespace paludis
private PrivateImplementationPattern<ProfileFile>
{
public:
+ ///\name Basic operations
+ ///\{
+
ProfileFile();
~ProfileFile();
+ ///\}
+
+ /**
+ * Add a file.
+ */
void add_file(const FSEntry &);
+ ///\name Iterate over our profile lines.
+ ///\{
+
typedef libwrapiter::ForwardIterator<ProfileFile, const std::string> Iterator;
Iterator begin() const;
Iterator end() const;
+
+ ///\}
};
}
diff --git a/paludis/repositories/gentoo/portage_virtual_version_metadata.hh b/paludis/repositories/gentoo/portage_virtual_version_metadata.hh
index eb412c8..ea17292 100644
--- a/paludis/repositories/gentoo/portage_virtual_version_metadata.hh
+++ b/paludis/repositories/gentoo/portage_virtual_version_metadata.hh
@@ -24,6 +24,12 @@
namespace paludis
{
+ /**
+ * Version metadata for a PortageRepository virtual.
+ *
+ * \ingroup grpportagerepository
+ * \nosubgrouping
+ */
class PortageVirtualVersionMetadata :
public VersionMetadata,
public VersionMetadataVirtualInterface,
@@ -31,9 +37,14 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
PortageVirtualVersionMetadata(const SlotName &, const PackageDatabaseEntry &);
virtual ~PortageVirtualVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
diff --git a/paludis/repositories/gentoo/vdb_merger.hh b/paludis/repositories/gentoo/vdb_merger.hh
index dbefbb0..353fc71 100644
--- a/paludis/repositories/gentoo/vdb_merger.hh
+++ b/paludis/repositories/gentoo/vdb_merger.hh
@@ -30,14 +30,25 @@ namespace paludis
#include <paludis/repositories/gentoo/vdb_merger-sr.hh>
+ /**
+ * Merger for VDBRepository.
+ *
+ * \ingroup grpvdbrepository
+ * \nosubgrouping
+ */
class VDBMerger :
public Merger,
private PrivateImplementationPattern<VDBMerger>
{
public:
+ ///\name Basic operations
+ ///\{
+
VDBMerger(const VDBMergerOptions &);
~VDBMerger();
+ ///\}
+
virtual Hook extend_hook(const Hook &);
virtual void record_install_file(const FSEntry &, const FSEntry &, const std::string &);
diff --git a/paludis/repositories/gentoo/vdb_repository.cc b/paludis/repositories/gentoo/vdb_repository.cc
index 979699e..3c038aa 100644
--- a/paludis/repositories/gentoo/vdb_repository.cc
+++ b/paludis/repositories/gentoo/vdb_repository.cc
@@ -1278,18 +1278,6 @@ VDBRepository::do_use_expand_hidden_prefixes() const
return std::tr1::shared_ptr<const UseFlagNameCollection>(new UseFlagNameCollection::Concrete);
}
-UseFlagName
-VDBRepository::do_use_expand_name(const UseFlagName & u) const
-{
- return u;
-}
-
-UseFlagName
-VDBRepository::do_use_expand_value(const UseFlagName & u) const
-{
- return u;
-}
-
bool
VDBRepository::load_provided_using_cache() const
{
diff --git a/paludis/repositories/gentoo/vdb_repository.hh b/paludis/repositories/gentoo/vdb_repository.hh
index c0f186c..66bab89 100644
--- a/paludis/repositories/gentoo/vdb_repository.hh
+++ b/paludis/repositories/gentoo/vdb_repository.hh
@@ -108,8 +108,6 @@ namespace paludis
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_arch_flags() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_flags() const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_hidden_prefixes() const;
- virtual UseFlagName do_use_expand_name(const UseFlagName & u) const;
- virtual UseFlagName do_use_expand_value(const UseFlagName & u) const;
virtual std::tr1::shared_ptr<const UseFlagNameCollection> do_use_expand_prefixes() const;
/* end of RepositoryUseInterface */
@@ -117,8 +115,14 @@ namespace paludis
virtual std::tr1::shared_ptr<const CategoryNamePartCollection> do_category_names_containing_package(
const PackageNamePart &) const;
+ /**
+ * Add a string to world.
+ */
virtual void add_string_to_world(const std::string &) const;
+ /**
+ * Remove a string from world.
+ */
virtual void remove_string_from_world(const std::string &) const;
virtual void do_config(const QualifiedPackageName &, const VersionSpec &) const;
diff --git a/paludis/repositories/gentoo/vdb_unmerger.hh b/paludis/repositories/gentoo/vdb_unmerger.hh
index 48f3829..ba47547 100644
--- a/paludis/repositories/gentoo/vdb_unmerger.hh
+++ b/paludis/repositories/gentoo/vdb_unmerger.hh
@@ -32,13 +32,31 @@ namespace paludis
#include <paludis/repositories/gentoo/vdb_unmerger-sr.hh>
+ /**
+ * Thrown if an unmerge from a VDBRepository using VDBUnmerger fails.
+ *
+ * \ingroup grpvdbrepository
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class VDBUnmergerError :
public UnmergerError
{
public:
+ ///\name Basic operations
+ ///\{
+
VDBUnmergerError(const std::string &) throw ();
+
+ ///\}
};
+ /**
+ * Handle unmerging from a VDBRepository.
+ *
+ * \ingroup grpvdbrepository
+ * \nosubgrouping
+ */
class VDBUnmerger :
private PrivateImplementationPattern<VDBUnmerger>,
public Unmerger
@@ -47,18 +65,32 @@ namespace paludis
bool config_protected(const FSEntry &);
std::string make_tidy(const FSEntry &) const;
+ /**
+ * Unmerge non-directories.
+ */
template <typename I_>
void unmerge_non_directories(I_ begin, const I_ end);
+ /**
+ * Unmerge directories.
+ */
template <typename I_>
void unmerge_directories(I_ begin, const I_ end);
public:
+ ///\name Basic operations
+ ///\{
+
VDBUnmerger(const VDBUnmergerOptions &);
~VDBUnmerger();
+ ///\}
+
virtual Hook extend_hook(const Hook &);
+ /**
+ * Perform the unmerge.
+ */
void unmerge();
};
diff --git a/paludis/repositories/gentoo/vdb_version_metadata.hh b/paludis/repositories/gentoo/vdb_version_metadata.hh
index e2063a3..a19a9d0 100644
--- a/paludis/repositories/gentoo/vdb_version_metadata.hh
+++ b/paludis/repositories/gentoo/vdb_version_metadata.hh
@@ -24,6 +24,14 @@
namespace paludis
{
+ /**
+ * Version metadata for a VDBRepository entry.
+ *
+ * \see VDBRepository
+ * \see VersionMetadata
+ * \ingroup grpvdbrepository
+ * \nosubgrouping
+ */
class VDBVersionMetadata :
public VersionMetadata,
public VersionMetadataDepsInterface,
@@ -33,15 +41,28 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
VDBVersionMetadata();
virtual ~VDBVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
}
};
+ /**
+ * Version metadata for a VDBRepository virtual entry.
+ *
+ * \see VDBRepository
+ * \see VersionMetadata
+ * \ingroup grpvdbrepository
+ * \nosubgrouping
+ */
class VDBVirtualVersionMetadata :
public VersionMetadata,
public VersionMetadataDepsInterface,
@@ -49,9 +70,14 @@ namespace paludis
public virtual VersionMetadataHasInterfaces
{
public:
+ ///\name Basic operations
+ ///\{
+
VDBVirtualVersionMetadata(const SlotName &, const PackageDatabaseEntry &);
virtual ~VDBVirtualVersionMetadata();
+ ///\}
+
virtual const VersionMetadata * version_metadata() const
{
return this;
diff --git a/paludis/repositories/repository_maker.hh b/paludis/repositories/repository_maker.hh
index 5f3e447..517d99e 100644
--- a/paludis/repositories/repository_maker.hh
+++ b/paludis/repositories/repository_maker.hh
@@ -72,11 +72,16 @@ namespace paludis
mutable std::string _what;
public:
+ ///\name Basic operations
+ ///\{
+
PaludisRepositorySoDirCannotDlopenError(const std::string & file,
const std::string & e) throw ();
~PaludisRepositorySoDirCannotDlopenError() throw ();
+ ///\}
+
const char * what() const throw ();
};
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 4b30a5a..529438e 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -370,12 +370,6 @@ VirtualsRepository::do_has_category_named(const CategoryNamePart & c) const
return p.first != p.second;
}
-bool
-VirtualsRepository::do_is_licence(const std::string &) const
-{
- return false;
-}
-
void
VirtualsRepository::invalidate()
{
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index 03c2e3c..0df6450 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -65,8 +65,6 @@ namespace paludis
virtual bool do_has_category_named(const CategoryNamePart &) const;
- virtual bool do_is_licence(const std::string &) const;
-
virtual void do_install(const QualifiedPackageName &, const VersionSpec &,
const InstallOptions &) const;
diff --git a/paludis/repositories/virtuals/vr_entry.sr b/paludis/repositories/virtuals/vr_entry.sr
index eba905f..2710d0f 100644
--- a/paludis/repositories/virtuals/vr_entry.sr
+++ b/paludis/repositories/virtuals/vr_entry.sr
@@ -10,6 +10,15 @@ make_class_VREntry()
comparison_operators all virtual_name version
+ doxygen_comment << "END"
+ /**
+ * Internal data structure for a virtual in a VirtualsRepository.
+ *
+ * \see VirtualsRepository
+ * \nosubgrouping
+ */
+END
+
allow_named_args
}
diff --git a/paludis/set_file.hh b/paludis/set_file.hh
index 8274c60..e95c6c2 100644
--- a/paludis/set_file.hh
+++ b/paludis/set_file.hh
@@ -45,7 +45,12 @@ namespace paludis
public ConfigurationError
{
public:
+ ///\name Basic operations
+ ///\{
+
SetFileError(const FSEntry &, const std::string &) throw ();
+
+ ///\}
};
/**
diff --git a/paludis/util/graph-impl.hh b/paludis/util/graph-impl.hh
index d919530..1cd513e 100644
--- a/paludis/util/graph-impl.hh
+++ b/paludis/util/graph-impl.hh
@@ -28,17 +28,31 @@
namespace paludis
{
+ /**
+ * Holds the remaining nodes list for a NoGraphTopologicalOrderExistsError.
+ *
+ * \see NoGraphTopologicalOrderExistsError
+ * \ingroup grpexceptions
+ * \ingroup grpgraph
+ * \nosubgrouping
+ */
class NoGraphTopologicalOrderExistsError::RemainingNodes
{
private:
std::list<std::string> _n;
public:
+ /**
+ * Add a remaining node.
+ */
void add(const std::string & s)
{
_n.push_back(s);
}
+ ///\name Iterate over our nodes
+ ///\{
+
typedef libwrapiter::ForwardIterator<RemainingNodes, const std::string> Iterator;
Iterator begin() const
@@ -50,14 +64,27 @@ namespace paludis
{
return Iterator(_n.end());
}
+
+ ///\}
};
+ /**
+ * Implementation data for a DirectedGraph.
+ *
+ * \see DirectedGraph
+ * \ingroup grpgraph
+ * \nosubgrouping
+ */
template<>
template <typename Node_, typename Edge_>
struct Implementation<DirectedGraph<Node_, Edge_> >
{
+ /// Our data.
std::map<Node_, std::map<Node_, Edge_> > store;
+ ///\name Basic operations
+ ///\{
+
Implementation()
{
}
@@ -66,6 +93,8 @@ namespace paludis
store(s)
{
}
+
+ ///\}
};
template <typename Node_, typename Edge_>
@@ -107,6 +136,13 @@ namespace paludis
return _imp->store.end() != _imp->store.find(n);
}
+ /**
+ * Iterate over the nodes in a DirectedGraph.
+ *
+ * \see DirectedGraph
+ * \ingroup grpgraph
+ * \nosubgrouping
+ */
template <typename Node_, typename Edge_>
class DirectedGraph<Node_, Edge_>::NodeIterator
{
@@ -121,6 +157,9 @@ namespace paludis
}
public:
+ ///\name Basic operations
+ ///\{
+
NodeIterator(const NodeIterator & other) :
_i(other._i)
{
@@ -130,6 +169,11 @@ namespace paludis
{
}
+ ///\}
+
+ ///\name Comparison operators
+ ///\{
+
bool operator== (const NodeIterator & other) const
{
return _i == other._i;
@@ -140,6 +184,11 @@ namespace paludis
return ! operator== (other);
}
+ ///\}
+
+ ///\name Advance operators
+ ///\{
+
NodeIterator & operator++ ()
{
++_i;
@@ -153,6 +202,11 @@ namespace paludis
return tmp;
}
+ ///\}
+
+ ///\name Dereference operators
+ ///\{
+
const Node_ & operator*() const
{
return _i->first;
@@ -162,6 +216,8 @@ namespace paludis
{
return &_i->first;
}
+
+ ///\}
};
template <typename Node_, typename Edge_>
diff --git a/paludis/util/graph.hh b/paludis/util/graph.hh
index f1ecd2f..62bf240 100644
--- a/paludis/util/graph.hh
+++ b/paludis/util/graph.hh
@@ -24,53 +24,114 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/exception.hh>
+/** \file
+ * Declarations for DirectedGraph and related utilities.
+ *
+ * \ingroup grpgraph
+ */
+
namespace paludis
{
+ /**
+ * Base class for DirectedGraph errors.
+ *
+ * \ingroup grpgraph
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class GraphError :
public Exception
{
protected:
+ ///\name Basic operations
+ ///\{
+
GraphError(const std::string & msg) throw ();
+
+ ///\}
};
+ /**
+ * Thrown if a DirectedGraph operation relies upon a node being present when it is not.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grpgraph
+ * \nosubgrouping
+ */
class NoSuchGraphNodeError :
public GraphError
{
public:
+ ///\name Basic operations
+ ///\{
+
template <typename Node_>
NoSuchGraphNodeError(const Node_ & node) throw () :
GraphError("Node '" + stringify(node) + "' does not exist")
{
}
+
+ ///\}
};
+ /**
+ * Thrown if a DirectedGraph operation relies upon an edge being present when it is not.
+ *
+ * \ingroup grpgraph
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class NoSuchGraphEdgeError :
public GraphError
{
public:
+ ///\name Basic operations
+ ///\{
+
template <typename Node_>
NoSuchGraphEdgeError(const Node_ & e1, const Node_ & e2) throw () :
GraphError("Edge '" + stringify(e1) + "' -> '" + stringify(e2) + "' does not exist")
{
}
+
+ ///\}
};
+ /**
+ * Thrown if no ordering is available for a DirectedGraph::topological_sort.
+ *
+ * \ingroup grpgraph
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class NoGraphTopologicalOrderExistsError :
public GraphError
{
private:
class RemainingNodes;
-
- private:
std::tr1::shared_ptr<const RemainingNodes> _remaining_nodes;
public:
+ ///\name Basic operations
+ ///\{
+
NoGraphTopologicalOrderExistsError(std::tr1::shared_ptr<const RemainingNodes>) throw ();
~NoGraphTopologicalOrderExistsError() throw ();
+ ///\}
+
+ /**
+ * The nodes remaining in the graph.
+ */
std::tr1::shared_ptr<const RemainingNodes> remaining_nodes() const;
};
+ /**
+ * A simple directed graph.
+ *
+ * \ingroup grpgraph
+ * \nosubgrouping
+ */
template <typename Node_, typename Edge_>
class DirectedGraph :
private PrivateImplementationPattern<DirectedGraph<Node_, Edge_> >
@@ -81,10 +142,15 @@ namespace paludis
void operator= (const DirectedGraph &);
public:
+ ///\name Basic operations
+ ///\{
+
DirectedGraph();
DirectedGraph(const DirectedGraph &);
~DirectedGraph();
+ ///\}
+
///\name Node related functions
///\{
@@ -103,6 +169,11 @@ namespace paludis
*/
bool has_node(const Node_ &) const;
+ ///\}
+
+ ///\name Iterate over our nodes
+ ///\{
+
class NodeIterator;
NodeIterator begin_nodes() const;
NodeIterator end_nodes() const;
diff --git a/paludis/util/iterator.hh b/paludis/util/iterator.hh
index 1902e12..61971df 100644
--- a/paludis/util/iterator.hh
+++ b/paludis/util/iterator.hh
@@ -68,12 +68,19 @@ namespace paludis
template <typename T_>
struct RemoveSharedPointer
{
+ /// Our type, with std::tr1::shared_ptr removed.
typedef T_ Type;
};
+ /**
+ * Like std::tr1::remove_pointer, for std::tr1::shared_ptr.
+ *
+ * \ingroup grpiterators
+ */
template <typename T_>
struct RemoveSharedPointer<std::tr1::shared_ptr<T_> >
{
+ /// Our type, with std::tr1::shared_ptr removed.
typedef T_ Type;
};
@@ -85,6 +92,7 @@ namespace paludis
template <typename T_>
struct RemoveSharedPointer<const std::tr1::shared_ptr<T_> >
{
+ /// Our type, with std::tr1::shared_ptr removed.
typedef T_ Type;
};
diff --git a/paludis/util/private_implementation_pattern.hh b/paludis/util/private_implementation_pattern.hh
index 9ffd1a3..b7a8d33 100644
--- a/paludis/util/private_implementation_pattern.hh
+++ b/paludis/util/private_implementation_pattern.hh
@@ -50,6 +50,12 @@ namespace paludis
private InstantiationPolicy<PrivateImplementationPattern<C_>, instantiation_method::NonCopyableTag>
{
protected:
+ /**
+ * Smart pointer to our implementation.
+ *
+ * \see PrivateImplementationPattern
+ * \ingroup grppimp
+ */
class ImpPtr
{
private:
@@ -58,6 +64,9 @@ namespace paludis
Implementation<C_> * _ptr;
public:
+ ///\name Basic operations
+ ///\{
+
ImpPtr(Implementation<C_> * p) :
_ptr(p)
{
@@ -68,6 +77,11 @@ namespace paludis
delete _ptr;
}
+ ///\}
+
+ ///\name Dereference operators
+ //\{
+
Implementation<C_> * operator-> ()
{
return _ptr;
@@ -78,6 +92,11 @@ namespace paludis
return _ptr;
}
+ ///\}
+
+ /**
+ * Reset to a new Implementation.
+ */
void reset(Implementation<C_> * p)
{
std::swap(_ptr, p);
diff --git a/paludis/util/sr.hh b/paludis/util/sr.hh
index 6f48d72..c0de68d 100644
--- a/paludis/util/sr.hh
+++ b/paludis/util/sr.hh
@@ -29,6 +29,7 @@ namespace paludis
*/
struct Empty
{
+ /// Convenience instance.
static const Empty instance;
};
diff --git a/paludis/util/system.hh b/paludis/util/system.hh
index 0fdc783..a59a795 100644
--- a/paludis/util/system.hh
+++ b/paludis/util/system.hh
@@ -94,36 +94,115 @@ namespace paludis
/**
* A command to be run.
+ *
+ * \see PStream
+ * \see run_command
+ * \ingroup grpsystem
+ * \nosubgrouping
*/
class Command :
private PrivateImplementationPattern<Command>
{
public:
+ ///\name Basic operations
+ ///\{
+
Command(const std::string &);
Command(const char * const);
Command(const Command &);
const Command & operator= (const Command &);
~Command();
+ ///\}
+
+ ///\name Change command execution options
+ ///\{
+
+ /**
+ * Include a chdir before we run our command.
+ */
Command & with_chdir(const FSEntry &);
+
+ /**
+ * Add a setenv before we run our command.
+ */
Command & with_setenv(const std::string &, const std::string &);
+
+ /**
+ * Run our command sandboxed.
+ */
Command & with_sandbox();
+
+ /**
+ * Echo the command to be run to stderr before running it.
+ */
Command & with_echo_to_stderr();
+
+ /**
+ * Add a setuid and setgid before running our command.
+ */
Command & with_uid_gid(const uid_t, const gid_t);
+
+ /**
+ * Prefix stdout output with this.
+ */
Command & with_stdout_prefix(const std::string &);
+
+ /**
+ * Prefix stderr output with this.
+ */
Command & with_stderr_prefix(const std::string &);
+ ///\}
+
+ ///\name Fetch command execution options
+ ///\{
+
+ /**
+ * Our command, as a string.
+ */
std::string command() const;
+
+ /**
+ * Where to chdir, as a string.
+ */
std::string chdir() const;
+
+ /**
+ * Echo ourself to stderr.
+ */
void echo_to_stderr() const;
+
+ /**
+ * The uid for setuid.
+ */
std::tr1::shared_ptr<const uid_t> uid() const;
+
+ /**
+ * The gid for setgid.
+ */
std::tr1::shared_ptr<const gid_t> gid() const;
+
+ /**
+ * The stdout prefix.
+ */
std::string stdout_prefix() const;
+
+ /**
+ * The stderr prefix.
+ */
std::string stderr_prefix() const;
+ ///\}
+
+ ///\name Iterate over our setenvs.
+ ///\{
+
typedef libwrapiter::ForwardIterator<Command, const std::pair<const std::string, std::string> > Iterator;
Iterator begin_setenvs() const;
Iterator end_setenvs() const;
+
+ ///\}
};
diff --git a/paludis/util/virtual_constructor-impl.hh b/paludis/util/virtual_constructor-impl.hh
index 586e491..8612383 100644
--- a/paludis/util/virtual_constructor-impl.hh
+++ b/paludis/util/virtual_constructor-impl.hh
@@ -79,9 +79,17 @@ namespace paludis
};
}
+ /**
+ * Holds the entries for a VirtualConstructor.
+ *
+ * \see VirtualConstructor
+ * \ingroup grpvc
+ * \nosubgrouping
+ */
template <typename KeyType_, typename ValueType_, typename NotFoundBehaviour_>
struct VirtualConstructor<KeyType_, ValueType_, NotFoundBehaviour_>::EntriesHolder
{
+ /// The entries.
std::vector<std::pair<KeyType_, ValueType_> > entries;
};
diff --git a/paludis/util/visitor.hh b/paludis/util/visitor.hh
index 7aa374c..09e7efd 100644
--- a/paludis/util/visitor.hh
+++ b/paludis/util/visitor.hh
@@ -28,8 +28,10 @@
namespace std
{
+#ifndef DOXYGEN
template <typename A_, typename B_>
B_ for_each(A_, A_, B_);
+#endif
}
namespace paludis
@@ -372,6 +374,12 @@ namespace paludis
return AcceptVisitor<VisitorPointer_>(p);
}
+ /**
+ * Convenience mixin class: implement a particular visit function by
+ * visiting its begin/end range.
+ *
+ * \ingroup grpvisitor
+ */
template <
typename N1_,
typename N2_,
diff --git a/paludis/version_metadata.hh b/paludis/version_metadata.hh
index b388847..0b7e2ac 100644
--- a/paludis/version_metadata.hh
+++ b/paludis/version_metadata.hh
@@ -45,14 +45,28 @@ namespace paludis
class VersionMetadataLicenseInterface;
class VersionMetadata;
+ /**
+ * Implemented as a virtual base by VersionMetadata descendents, to allow
+ * interfaces to access the base VersionMetadata class.
+ *
+ * \ingroup grpversions
+ */
class VersionMetadataHasInterfaces
{
protected:
+ ///\name Basic operations
+ ///\{
+
VersionMetadataHasInterfaces();
public:
virtual ~VersionMetadataHasInterfaces();
+ ///\}
+
+ /**
+ * Fetch our base VersionMetadata class.
+ */
virtual const VersionMetadata * version_metadata() const = 0;
};
@@ -86,11 +100,18 @@ namespace paludis
public:
virtual ~VersionMetadata();
+ /**
+ * Return the appropriate PackageDepSpecParseMode for our EAPI.
+ */
PackageDepSpecParseMode eapi_as_package_dep_spec_parse_mode() const;
protected:
+ ///\name Basic operations
+ ///\{
+
VersionMetadata(const VersionMetadataBase::NamedArguments<> &, const VersionMetadataCapabilities &);
+ ///\}
};
}
diff --git a/paludis/version_requirements.hh b/paludis/version_requirements.hh
index 1db06bd..68d7371 100644
--- a/paludis/version_requirements.hh
+++ b/paludis/version_requirements.hh
@@ -38,6 +38,12 @@ namespace paludis
*/
typedef SequentialCollection<VersionRequirement> VersionRequirements;
+ /**
+ * Whether our version requirements are an 'and' or an 'or' set.
+ *
+ * \see PackageDepSpec
+ * \ingroup grpversions
+ */
enum VersionRequirementsMode
{
vr_or, ///\< Must match one
diff --git a/paludis/version_spec.hh b/paludis/version_spec.hh
index 01c1450..e7ba6f3 100644
--- a/paludis/version_spec.hh
+++ b/paludis/version_spec.hh
@@ -46,8 +46,13 @@ namespace paludis
public NameError
{
public:
+ ///\name Basic operations
+ ///\{
+
BadVersionSpecError(const std::string & name) throw ();
BadVersionSpecError(const std::string & name, const std::string & msg) throw ();
+
+ ///\}
};
/**
diff --git a/paludis/version_spec.sr b/paludis/version_spec.sr
index 0125b6f..b7e1e27 100644
--- a/paludis/version_spec.sr
+++ b/paludis/version_spec.sr
@@ -6,6 +6,15 @@ make_class_Part()
key kind PartKind
key value "unsigned long"
key leading_zeroes "unsigned long"
+
+ doxygen_comment << "END"
+ /**
+ * Internal use by VersionSpec.
+ *
+ * \ingroup grpversions
+ * \nosubgrouping
+ */
+END
}