aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-12 12:15:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-12 12:15:29 +0000
commit9a4ecdca000f29ff7889cb7a534f17a472e2b166 (patch)
tree6d0ef8b0260e78c8eceda09e34aa6291a395a438
parent9aeed4104cfacdfefb99d10a936443a86418a399 (diff)
downloadpaludis-9a4ecdca000f29ff7889cb7a534f17a472e2b166.tar.gz
paludis-9a4ecdca000f29ff7889cb7a534f17a472e2b166.tar.xz
Doxygen work
-rw-r--r--doc/doc_main.doxygen5
-rw-r--r--paludis/dep_tag.hh67
-rw-r--r--paludis/environment/no_config/no_config_environment.hh19
-rw-r--r--paludis/libxml/libxml.hh8
-rw-r--r--paludis/repositories/cran/cran_dep_parser.hh3
-rw-r--r--paludis/repositories/cran/cran_description.hh10
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc6
-rw-r--r--paludis/repositories/cran/cran_installed_repository.hh7
-rw-r--r--paludis/repositories/cran/cran_repository.cc7
-rw-r--r--paludis/repositories/cran/cran_repository.hh4
-rw-r--r--paludis/repositories/portage/ebuild_flat_metadata_cache.hh24
-rw-r--r--paludis/repositories/portage/eclass_mtimes.hh15
-rw-r--r--paludis/repositories/portage/make_ebuild_repository.hh14
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh8
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh8
-rw-r--r--paludis/repositories/virtuals/vr_entry.hh46
-rw-r--r--paludis/repository.hh184
-rw-r--r--paludis/repository_name_cache.hh35
-rw-r--r--paludis/tasks/uninstall_task.hh13
-rw-r--r--paludis/util/fd_holder.hh8
-rw-r--r--paludis/util/fd_output_stream.hh2
-rw-r--r--paludis/util/sr.hh2
-rw-r--r--paludis/version_requirements.hh7
23 files changed, 435 insertions, 67 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index 9b417a6..e78e864 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -237,6 +237,11 @@
* \ingroup grpdependencies
*/
+/** \defgroup grpuninstalllist Uninstall (reverse dependency) resolution
+ *
+ * \ingroup grpuninstalllist
+ */
+
/** \defgroup grpdepatoms Dependency atoms
*
* \ingroup grpdependencies
diff --git a/paludis/dep_tag.hh b/paludis/dep_tag.hh
index ce1d492..c37010e 100644
--- a/paludis/dep_tag.hh
+++ b/paludis/dep_tag.hh
@@ -48,6 +48,7 @@ namespace paludis
* \see DepTag
*
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class DepTagCategory :
InstantiationPolicy<DepTagCategory, instantiation_method::NonCopyableTag>,
@@ -61,9 +62,9 @@ namespace paludis
const std::string _post_text;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
DepTagCategory(
bool visible,
const std::string & id,
@@ -71,6 +72,8 @@ namespace paludis
const std::string & pre,
const std::string & post);
+ ///\}
+
/**
* Should we be displayed in a tag category summary?
*/
@@ -118,15 +121,18 @@ namespace paludis
*
* \ingroup grpexceptions
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class NoSuchDepTagCategory :
public Exception
{
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
NoSuchDepTagCategory(const std::string &) throw ();
+
+ ///\}
};
/**
@@ -146,6 +152,7 @@ namespace paludis
* Visitor class for visiting the different DepTag subclasses.
*
* \ingroup grpdeptag
+ * \see DepTag
*/
typedef VisitorTypes<GLSADepTag *, GeneralSetDepTag *, DependencyDepTag *> DepTagVisitorTypes;
@@ -157,6 +164,7 @@ namespace paludis
* indicate an associated GLSA.
*
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class DepTag :
InstantiationPolicy<DepTag, instantiation_method::NonCopyableTag>,
@@ -167,17 +175,16 @@ namespace paludis
comparison_method::CompareByMemberFetchFunctionTag<std::string> >
{
protected:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
DepTag();
public:
- /**
- * Destructor.
- */
virtual ~DepTag();
+ ///\}
+
/**
* Fetch our short text (for example, 'GLSA-1234') that is
* displayed with the dep list entry.
@@ -188,16 +195,13 @@ namespace paludis
* Fetch our DepTagCategory's tag.
*/
virtual std::string category() const = 0;
-
- /**
- * Compare, by short_text only.
- */
};
/**
* DepTag subclass for GLSAs.
*
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class GLSADepTag :
public DepTag,
@@ -208,11 +212,13 @@ namespace paludis
const std::string _glsa_title;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
GLSADepTag(const std::string & id, const std::string & glsa_title);
+ ///\}
+
virtual std::string short_text() const;
virtual std::string category() const;
@@ -228,6 +234,7 @@ namespace paludis
* DepTag subclass for general sets.
*
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class GeneralSetDepTag :
public DepTag,
@@ -238,15 +245,20 @@ namespace paludis
const std::string _source;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
GeneralSetDepTag(const SetName & id, const std::string & source);
+ ///\}
+
virtual std::string short_text() const;
virtual std::string category() const;
+ /**
+ * From which repository or environment did we originate?
+ */
std::string source() const;
};
@@ -254,6 +266,7 @@ namespace paludis
* DepTag subclass for dependencies.
*
* \ingroup grpdeptag
+ * \nosubgrouping
*/
class DependencyDepTag :
public DepTag,
@@ -263,11 +276,13 @@ namespace paludis
const PackageDatabaseEntry _dbe;
public:
- /**
- * Constructor.
- */
+ ///\name Basic operations
+ ///\{
+
DependencyDepTag(const PackageDatabaseEntry & dbe);
+ ///\}
+
virtual std::string short_text() const;
virtual std::string category() const;
@@ -277,6 +292,8 @@ namespace paludis
/**
* Tags attached to a DepListEntry.
+ *
+ * \ingroup grpdeptag
*/
typedef SortedCollection<DepTagEntry> DepListEntryTags;
}
diff --git a/paludis/environment/no_config/no_config_environment.hh b/paludis/environment/no_config/no_config_environment.hh
index 8e8b114..9aacca6 100644
--- a/paludis/environment/no_config/no_config_environment.hh
+++ b/paludis/environment/no_config/no_config_environment.hh
@@ -46,29 +46,48 @@ namespace paludis
* An environment that uses a single repository, with no user configuration.
*
* \ingroup grpnoconfigenvironment
+ * \nosubgrouping
*/
class PALUDIS_VISIBLE NoConfigEnvironment :
private PrivateImplementationPattern<NoConfigEnvironment>,
public Environment
{
public:
+ ///\name Basic operations
+ ///\{
+
NoConfigEnvironment(const NoConfigEnvironmentParams & params);
virtual ~NoConfigEnvironment();
+ ///\}
+
virtual std::string paludis_command() const;
+ /**
+ * What is our top level directory for our main repository?
+ */
FSEntry main_repository_dir() const;
virtual bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
+ ///\name Iterate over our profiles
+ ///\{
+
typedef libwrapiter::ForwardIterator<NoConfigEnvironment, const NoConfigEnvironmentProfilesDescLine> ProfilesIterator;
ProfilesIterator begin_profiles() const;
ProfilesIterator end_profiles() const;
+ ///\}
+
+ ///\name Profile functions
+ ///\{
+
void set_profile(const FSEntry & location);
void set_profile(const ProfilesIterator & iter);
+ ///\}
+
};
}
diff --git a/paludis/libxml/libxml.hh b/paludis/libxml/libxml.hh
index 2797b87..7ae7078 100644
--- a/paludis/libxml/libxml.hh
+++ b/paludis/libxml/libxml.hh
@@ -44,6 +44,9 @@ namespace paludis
void operator= (const LibXmlPtrHolder &);
public:
+ ///\name Basic operations
+ ///\{
+
LibXmlPtrHolder(PtrType_ ptr, void (* free_func) (PtrType_)) :
_ptr(ptr),
_free_func(free_func)
@@ -56,6 +59,11 @@ namespace paludis
_free_func(_ptr);
}
+ ///\}
+
+ /**
+ * Cast to our pointer type.
+ */
operator PtrType_ () const
{
return _ptr;
diff --git a/paludis/repositories/cran/cran_dep_parser.hh b/paludis/repositories/cran/cran_dep_parser.hh
index 69bdd80..d0c13d5 100644
--- a/paludis/repositories/cran/cran_dep_parser.hh
+++ b/paludis/repositories/cran/cran_dep_parser.hh
@@ -14,6 +14,9 @@ namespace paludis
*/
struct PALUDIS_VISIBLE CRANDepParser
{
+ /**
+ * Parse function.
+ */
static DepAtom::ConstPointer parse(const std::string & s);
};
}
diff --git a/paludis/repositories/cran/cran_description.hh b/paludis/repositories/cran/cran_description.hh
index 850004e..f1d2cdb 100644
--- a/paludis/repositories/cran/cran_description.hh
+++ b/paludis/repositories/cran/cran_description.hh
@@ -82,6 +82,9 @@ namespace paludis
*/
struct PALUDIS_VISIBLE ComparePackage
{
+ ///\name Comparison operators
+ ///\{
+
bool operator() (const QualifiedPackageName & c, const CRANDescription & d) const
{
return c < d.name;
@@ -91,6 +94,8 @@ namespace paludis
{
return d.name < c;
}
+
+ ///\}
};
/**
@@ -100,6 +105,9 @@ namespace paludis
*/
struct PALUDIS_VISIBLE CompareVersion
{
+ ///\name Comparison operators
+ ///\{
+
bool operator() (const std::pair<QualifiedPackageName, VersionSpec> & c,
const CRANDescription & d) const
{
@@ -125,6 +133,8 @@ namespace paludis
else
return false;
}
+
+ ///\}
};
};
}
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 106e3d3..737af8d 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -577,12 +577,6 @@ CRANInstalledRepository::sets_list() const
return result;
}
-bool
-CRANInstalledRepository::do_sync() const
-{
- return false;
-}
-
void
CRANInstalledRepository::invalidate() const
{
diff --git a/paludis/repositories/cran/cran_installed_repository.hh b/paludis/repositories/cran/cran_installed_repository.hh
index fc4eae6..6c81da6 100644
--- a/paludis/repositories/cran/cran_installed_repository.hh
+++ b/paludis/repositories/cran/cran_installed_repository.hh
@@ -88,8 +88,6 @@ namespace paludis
virtual SetsCollection::ConstPointer sets_list() const;
- virtual bool do_sync() const;
-
public:
/**
* Constructor.
@@ -109,11 +107,6 @@ namespace paludis
*/
~CRANInstalledRepository();
- virtual bool installed() const
- {
- return true;
- }
-
virtual void invalidate() const;
virtual void add_to_world(const QualifiedPackageName &) const;
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 1e3c8fd..8fc62b1 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -434,13 +434,6 @@ CRANRepository::do_version_metadata(
return result;
}
-Contents::ConstPointer
-CRANRepository::do_contents(
- const CategoryNamePart &, const PackageNamePart &, const VersionSpec &) const
-{
- return Contents::Pointer(new Contents);
-}
-
CountedPtr<Repository>
CRANRepository::make_cran_repository(
const Environment * const env,
diff --git a/paludis/repositories/cran/cran_repository.hh b/paludis/repositories/cran/cran_repository.hh
index 7277016..6c66344 100644
--- a/paludis/repositories/cran/cran_repository.hh
+++ b/paludis/repositories/cran/cran_repository.hh
@@ -80,10 +80,6 @@ namespace paludis
const QualifiedPackageName &,
const VersionSpec &) const;
- virtual Contents::ConstPointer do_contents(
- const CategoryNamePart &, const PackageNamePart &,
- const VersionSpec &) const;
-
virtual bool do_is_licence(const std::string &) const;
virtual void do_install(const QualifiedPackageName &, const VersionSpec &,
diff --git a/paludis/repositories/portage/ebuild_flat_metadata_cache.hh b/paludis/repositories/portage/ebuild_flat_metadata_cache.hh
index a89733c..6c75465 100644
--- a/paludis/repositories/portage/ebuild_flat_metadata_cache.hh
+++ b/paludis/repositories/portage/ebuild_flat_metadata_cache.hh
@@ -26,6 +26,15 @@
namespace paludis
{
+ /**
+ * Implements flat file metadata cache handling for a PortageRepository
+ * using EbuildEntries.
+ *
+ * \see EbuildEntries
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ * \nosubgrouping
+ */
class EbuildFlatMetadataCache
{
private:
@@ -36,10 +45,21 @@ namespace paludis
bool _silent;
public:
- EbuildFlatMetadataCache(const FSEntry &, const FSEntry &,
- time_t, EclassMtimes::ConstPointer, bool silent);
+ ///\name Basic operations
+ ///\{
+
+ EbuildFlatMetadataCache(const FSEntry & filename, const FSEntry & ebuild,
+ time_t master_mtime, EclassMtimes::ConstPointer eclass_mtimes, bool silent);
+
+ ///\}
+
+ ///\name Cache operations
+ ///\{
+
bool load(VersionMetadata::Pointer);
void save(VersionMetadata::ConstPointer);
+
+ ///\}
};
}
diff --git a/paludis/repositories/portage/eclass_mtimes.hh b/paludis/repositories/portage/eclass_mtimes.hh
index 84b3616..8570626 100644
--- a/paludis/repositories/portage/eclass_mtimes.hh
+++ b/paludis/repositories/portage/eclass_mtimes.hh
@@ -26,14 +26,29 @@
namespace paludis
{
+ /**
+ * Holds an eclass mtimes cache for a PortageRepository.
+ *
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ * \nosubgrouping
+ */
class EclassMtimes :
private PrivateImplementationPattern<EclassMtimes>,
public InternalCounted<EclassMtimes>
{
public:
+ ///\name Basic operations
+ ///\{
+
EclassMtimes(FSEntryCollection::ConstPointer);
~EclassMtimes();
+ ///\}
+
+ /**
+ * Fetch the mtime for a given eclass.
+ */
time_t mtime(const std::string &) const;
};
}
diff --git a/paludis/repositories/portage/make_ebuild_repository.hh b/paludis/repositories/portage/make_ebuild_repository.hh
index 83d834f..8a3db2f 100644
--- a/paludis/repositories/portage/make_ebuild_repository.hh
+++ b/paludis/repositories/portage/make_ebuild_repository.hh
@@ -24,11 +24,25 @@
namespace paludis
{
+ /**
+ * Create an ebuild format repository.
+ *
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ */
CountedPtr<Repository>
make_ebuild_repository(const Environment * const,
const PackageDatabase * const,
AssociativeCollection<std::string, std::string>::ConstPointer) PALUDIS_VISIBLE;
+ /**
+ * Create an ebuild format repository.
+ *
+ * This function forwards to paludis::make_ebuild_repository().
+ *
+ * \see paludis::make_ebuild_repository()
+ * \ingroup grpportagerepository
+ */
CountedPtr<Repository>
make_portage_repository(const Environment * const,
const PackageDatabase * const,
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 108906d..f1ff29f 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -75,10 +75,18 @@ namespace paludis
const InstallOptions &) const;
public:
+ ///\name Basic operations
+ //\{
+
InstalledVirtualsRepository(const Environment * const env);
virtual ~InstalledVirtualsRepository();
+ ///\}
+
+ /**
+ * Create an InstalledVirtualsRepository instance.
+ */
static CountedPtr<Repository> make_installed_virtuals_repository(
const Environment * const env,
const PackageDatabase * const db,
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index f526238..84f4223 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -71,10 +71,18 @@ namespace paludis
const InstallOptions &) const;
public:
+ ///\name Basic operations
+ ///\{
+
VirtualsRepository(const Environment * const env);
virtual ~VirtualsRepository();
+ ///\}
+
+ /**
+ * Create a VirtualsRepository instance.
+ */
static CountedPtr<Repository> make_virtuals_repository(
const Environment * const env,
const PackageDatabase * const db,
diff --git a/paludis/repositories/virtuals/vr_entry.hh b/paludis/repositories/virtuals/vr_entry.hh
index 86206fd..90251e9 100644
--- a/paludis/repositories/virtuals/vr_entry.hh
+++ b/paludis/repositories/virtuals/vr_entry.hh
@@ -32,16 +32,28 @@ namespace paludis
/**
* Sort ordering for _imp->entries for an InstalledVirtualsRepository.
+ *
+ * \ingroup grpvirtualsrepository
+ * \nosubgrouping
*/
struct EntriesComparator
{
+ /// Our PackageDatabase instance.
PackageDatabase::ConstPointer const db;
+ ///\name Basic operations
+ ///\{
+
EntriesComparator(PackageDatabase::ConstPointer const d) :
db(d)
{
}
+ ///\}
+
+ ///\name Comparison operators
+ ///\{
+
bool
operator() (const VREntry & a, const VREntry & b) const
{
@@ -65,54 +77,88 @@ namespace paludis
return a.provided_by_name > b.provided_by_name; // not a bug either
}
+
+ ///\}
};
/**
* Comparison on name only for an VREntry.
+ *
+ * \ingroup grpvirtualsrepository
+ * \nosubgrouping
*/
struct EntriesNameComparator
{
+ ///\name Comparison operators
+ ///\{
+
bool
operator() (const VREntry & a, const VREntry & b) const
{
return a.virtual_name < b.virtual_name;
}
+
+ ///\}
};
/**
* Extract only the name for an VREntry.
+ *
+ * \ingroup grpvirtualsrepository
+ * \nosubgrouping
*/
struct EntriesNameExtractor
{
+ ///\name Extraction function
+ ///\{
+
QualifiedPackageName
operator() (const VREntry & a) const
{
return a.virtual_name;
}
+
+ ///\}
};
/**
* Comparison on category name only for an VREntry.
+ *
+ * \ingroup grpvirtualsrepository
+ * \nosubgrouping
*/
struct EntriesCategoryComparator
{
+ ///\name Comparison operators
+ ///\{
+
bool
operator() (const VREntry & a, const VREntry & b) const
{
return a.virtual_name.category < b.virtual_name.category;
}
+
+ ///\}
};
/**
* Extract only the category name for an VREntry.
+ *
+ * \ingroup grpvirtualsrepository
+ * \nosubgrouping
*/
struct EntriesCategoryExtractor
{
+ ///\name Extraction function
+ ///\{
+
CategoryNamePart
operator() (const VREntry & a) const
{
return a.virtual_name.category;
}
+
+ ///\}
};
}
diff --git a/paludis/repository.hh b/paludis/repository.hh
index bd0af96..4d06154 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -62,6 +62,11 @@ namespace paludis
class RepositoryProvidesInterface;
class RepositoryVirtualsInterface;
+ /**
+ * What debug build option to use when installing a package.
+ *
+ * \ingroup grprepository
+ */
enum InstallDebugOption
{
ido_none,
@@ -167,16 +172,23 @@ namespace paludis
const RepositoryName _name;
protected:
+ ///\name Implementation data
+ ///\{
+
/**
* Our information.
*/
mutable RepositoryInfo::Pointer _info;
- /**
- * Constructor.
- */
+ ///\}
+
+ ///\name Basic operations
+ ///\{
+
Repository(const RepositoryName &, const RepositoryCapabilities &);
+ ///\}
+
/**
* \name Implementations: navigation functions
*
@@ -248,12 +260,20 @@ namespace paludis
///\}
public:
- virtual RepositoryInfo::ConstPointer info(bool verbose) const;
+ ///\name Basic operations
+ ///\{
+
+ virtual ~Repository();
+
+ ///\}
+
+ ///\name Repository information
+ ///\{
/**
- * Destructor.
+ * Fetch information about the repository.
*/
- virtual ~Repository();
+ virtual RepositoryInfo::ConstPointer info(bool verbose) const;
/**
* Return our name.
@@ -261,6 +281,19 @@ namespace paludis
const RepositoryName & name() const PALUDIS_ATTRIBUTE((nothrow));
/**
+ * Are we allowed to be favourite repository?
+ */
+ virtual bool can_be_favourite_repository() const
+ {
+ return true;
+ }
+
+ ///\}
+
+ ///\name Repository content queries
+ ///\{
+
+ /**
* Do we have a category with the given name?
*/
bool has_category_named(const CategoryNamePart & c) const
@@ -337,6 +370,11 @@ namespace paludis
return do_is_licence(u);
}
+ ///\}
+
+ ///\name Repository behaviour methods
+ ///\{
+
/**
* Invalidate any in memory cache.
*/
@@ -347,13 +385,8 @@ namespace paludis
*/
virtual void regenerate_cache() const;
- /**
- * Are we allowed to be favourite repository?
- */
- virtual bool can_be_favourite_repository() const
- {
- return true;
- }
+ ///\}
+
};
/**
@@ -366,6 +399,9 @@ namespace paludis
class RepositoryMaskInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: check for a mask.
*/
@@ -378,7 +414,12 @@ namespace paludis
virtual bool do_query_profile_masks(const QualifiedPackageName &,
const VersionSpec &) const = 0;
+ ///\}
+
public:
+ ///\name Mask queries
+ ///\{
+
/**
* Query repository masks.
*/
@@ -395,6 +436,8 @@ namespace paludis
return do_query_profile_masks(q, v);
}
+ ///\}
+
virtual ~RepositoryMaskInterface() { }
};
@@ -408,6 +451,9 @@ namespace paludis
class RepositoryUseInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: get use.
*/
@@ -443,7 +489,12 @@ namespace paludis
*/
virtual UseFlagNameCollection::ConstPointer do_use_expand_prefixes() const = 0;
+ ///\}
+
public:
+ ///\name USE queries
+ ///\{
+
/**
* Query the state of the specified use flag.
*/
@@ -505,6 +556,8 @@ namespace paludis
return do_use_expand_prefixes();
}
+ ///\}
+
virtual ~RepositoryUseInterface() { }
};
@@ -518,6 +571,9 @@ namespace paludis
class RepositoryInstalledInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: fetch the contents.
*/
@@ -535,7 +591,12 @@ namespace paludis
return time_t(0);
}
+ ///\}
+
public:
+ ///\name Installed content queries
+ ///\{
+
/**
* Fetch contents.
*/
@@ -558,6 +619,8 @@ namespace paludis
return do_installed_time(q, v);
}
+ ///\}
+
virtual ~RepositoryInstalledInterface() { }
};
@@ -571,13 +634,21 @@ namespace paludis
class RepositoryInstallableInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: install.
*/
virtual void do_install(const QualifiedPackageName &, const VersionSpec &,
const InstallOptions &) const = 0;
+ ///\}
+
public:
+ ///\name Installable functions
+ ///\{
+
/**
* Install a package.
*/
@@ -586,6 +657,8 @@ namespace paludis
do_install(q, v, i);
}
+ ///\}
+
virtual ~RepositoryInstallableInterface() { }
};
@@ -599,13 +672,21 @@ namespace paludis
class RepositoryUninstallableInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: uninstall.
*/
virtual void do_uninstall(const QualifiedPackageName &, const VersionSpec &,
const InstallOptions &) const = 0;
+ ///\}
+
public:
+ ///\name Uninstall functions
+ ///\{
+
/**
* Uninstall a package.
*/
@@ -614,11 +695,15 @@ namespace paludis
do_uninstall(q, v, i);
}
+ ///\}
+
virtual ~RepositoryUninstallableInterface() { }
};
/**
* Contains the names of all the sets provided by the repository.
+ *
+ * \ingroup grpnames
*/
typedef SortedCollection<SetName> SetsCollection;
@@ -632,12 +717,20 @@ namespace paludis
class RepositorySetsInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: package list.
*/
virtual DepAtom::Pointer do_package_set(const SetName & id) const = 0;
+ ///\}
+
public:
+ ///\name Set queries
+ ///\{
+
/**
* Fetch a package set.
*/
@@ -651,6 +744,8 @@ namespace paludis
*/
virtual SetsCollection::ConstPointer sets_list() const = 0;
+ ///\}
+
virtual ~RepositorySetsInterface() { }
};
@@ -664,12 +759,20 @@ namespace paludis
class RepositorySyncableInterface
{
protected:
+ ///\name Implementation details
+ ///\{
+
/**
* Override in descendents: sync, if needed (true) or do nothing (false).
*/
virtual bool do_sync() const = 0;
+ ///\}
+
public:
+ ///\name Sync functions
+ ///\{
+
/**
* Sync, if necessary.
*
@@ -680,6 +783,8 @@ namespace paludis
return do_sync();
}
+ ///\}
+
virtual ~RepositorySyncableInterface() { }
};
@@ -693,6 +798,9 @@ namespace paludis
class RepositoryWorldInterface
{
public:
+ ///\name World functionality
+ ///\{
+
/**
* Add this package to world.
*/
@@ -703,6 +811,8 @@ namespace paludis
*/
virtual void remove_from_world(const QualifiedPackageName &) const = 0;
+ ///\}
+
virtual ~RepositoryWorldInterface() { }
};
@@ -716,12 +826,15 @@ namespace paludis
class RepositoryNewsInterface
{
public:
+ ///\name News functionality
+ ///\{
+
/**
* Update our news.unread file.
*/
- virtual void update_news() const
- {
- }
+ virtual void update_news() const = 0;
+
+ ///\}
virtual ~RepositoryNewsInterface() { }
};
@@ -736,6 +849,9 @@ namespace paludis
class RepositoryEnvironmentVariableInterface
{
public:
+ ///\name Environment query functionality
+ ///\{
+
/**
* Query an environment variable
*/
@@ -743,6 +859,8 @@ namespace paludis
const PackageDatabaseEntry & for_package,
const std::string & var) const = 0;
+ ///\}
+
virtual ~RepositoryEnvironmentVariableInterface() { }
};
@@ -773,6 +891,8 @@ namespace paludis
return begin_mirrors(s) != end_mirrors(s);
}
+ ///\}
+
virtual ~RepositoryMirrorsInterface() { }
};
@@ -786,13 +906,29 @@ namespace paludis
class RepositoryVirtualsInterface
{
public:
+ ///\name Virtuals functionality
+ ///\{
+
+ /**
+ * A collection of virtuals.
+ *
+ * \ingroup grprepository
+ */
typedef SortedCollection<RepositoryVirtualsEntry> VirtualsCollection;
+ /**
+ * Fetch our virtual packages.
+ */
virtual VirtualsCollection::ConstPointer virtual_packages() const = 0;
+ /**
+ * Fetch version metadata for a virtual
+ */
virtual VersionMetadata::ConstPointer virtual_package_version_metadata(
const RepositoryVirtualsEntry &, const VersionSpec & v) const = 0;
+ ///\}
+
virtual ~RepositoryVirtualsInterface() { }
};
@@ -806,13 +942,29 @@ namespace paludis
class RepositoryProvidesInterface
{
public:
+ ///\name Provides functionality
+ ///\{
+
+ /**
+ * A collection of provided packages.
+ *
+ * \ingroup grprepository
+ */
typedef SortedCollection<RepositoryProvidesEntry> ProvidesCollection;
+ /**
+ * Fetch our provided packages.
+ */
virtual ProvidesCollection::ConstPointer provided_packages() const = 0;
+ /**
+ * Fetch version metadata for a provided package.
+ */
virtual VersionMetadata::ConstPointer provided_package_version_metadata(
const RepositoryProvidesEntry &) const = 0;
+ ///\}
+
virtual ~RepositoryProvidesInterface() { }
};
diff --git a/paludis/repository_name_cache.hh b/paludis/repository_name_cache.hh
index 0b7a716..eb846ac 100644
--- a/paludis/repository_name_cache.hh
+++ b/paludis/repository_name_cache.hh
@@ -28,6 +28,13 @@ namespace paludis
class FSEntry;
class Repository;
+ /**
+ * Used by various Repository subclasses to implement a names cache.
+ *
+ * \see Repository
+ * \ingroup grprepository
+ * \nosubgrouping
+ */
class RepositoryNameCache :
public InternalCounted<RepositoryNameCache>,
private PrivateImplementationPattern<RepositoryNameCache>
@@ -36,20 +43,48 @@ namespace paludis
mutable bool _usable;
public:
+ ///\name Basic operations
+ ///\{
+
RepositoryNameCache(
const FSEntry & location,
const Repository * const repo);
+
virtual ~RepositoryNameCache();
+
+ ///\}
+
+ ///\name Cache helper functions
+ ///\{
+
+ /**
+ * Implement category_names_containing_package.
+ *
+ * May return a zero pointer, in which case the repository should
+ * fall back to Repository::do_category_names_containing_package or
+ * its own implementation.
+ */
CategoryNamePartCollection::ConstPointer category_names_containing_package(
const PackageNamePart & p) const;
+ /**
+ * Whether or not our cache is usable.
+ *
+ * Initially this will be true. After the first query the value may
+ * change to false (the query will return a zero pointer too).
+ */
bool usable() const PALUDIS_ATTRIBUTE((nothrow))
{
return _usable;
}
+ /**
+ * Implement cache regeneration.
+ */
void regenerate_cache() const;
+
+ ///\}
};
}
diff --git a/paludis/tasks/uninstall_task.hh b/paludis/tasks/uninstall_task.hh
index aa8244c..385374d 100644
--- a/paludis/tasks/uninstall_task.hh
+++ b/paludis/tasks/uninstall_task.hh
@@ -43,6 +43,9 @@ namespace paludis
const PackageDatabaseEntryCollection::ConstPointer _p;
public:
+ ///\name Basic operations
+ ///\{
+
AmbiguousUnmergeTargetError(const std::string & our_target,
const PackageDatabaseEntryCollection::ConstPointer matches) throw () :
Exception("Ambiguous unmerge target '" + our_target + "'"),
@@ -53,6 +56,11 @@ namespace paludis
~AmbiguousUnmergeTargetError() throw ();
+ ///\}
+
+ ///\name Iterate over our entries
+ ///\{
+
typedef PackageDatabaseEntryCollection::Iterator Iterator;
Iterator begin() const
@@ -65,6 +73,11 @@ namespace paludis
return _p->end();
}
+ ///\}
+
+ /**
+ * What was our target?
+ */
const std::string & target() const
{
return _t;
diff --git a/paludis/util/fd_holder.hh b/paludis/util/fd_holder.hh
index 2798fd9..4657c32 100644
--- a/paludis/util/fd_holder.hh
+++ b/paludis/util/fd_holder.hh
@@ -34,6 +34,9 @@ namespace paludis
const bool _sync;
public:
+ ///\name Basic operations
+ ///\{
+
FDHolder(const int fd, bool sync = true) :
_fd(fd),
_sync(sync)
@@ -50,6 +53,11 @@ namespace paludis
}
}
+ ///\}
+
+ /**
+ * Fetch our file descriptor.
+ */
operator int () const
{
return _fd;
diff --git a/paludis/util/fd_output_stream.hh b/paludis/util/fd_output_stream.hh
index e2e8ac1..fc66dee 100644
--- a/paludis/util/fd_output_stream.hh
+++ b/paludis/util/fd_output_stream.hh
@@ -38,6 +38,7 @@ namespace paludis
public std::streambuf
{
protected:
+ /// Our file descriptor.
int fd;
virtual int_type
@@ -78,6 +79,7 @@ namespace paludis
class PALUDIS_VISIBLE FDOutputStreamBase
{
protected:
+ /// Our buffer.
FDOutputStreamBuf buf;
public:
diff --git a/paludis/util/sr.hh b/paludis/util/sr.hh
index c364f07..3213d11 100644
--- a/paludis/util/sr.hh
+++ b/paludis/util/sr.hh
@@ -42,6 +42,7 @@ namespace paludis
template <typename IfTrue_, typename IfFalse_>
struct Select<true, IfTrue_, IfFalse_>
{
+ /// Our value.
typedef IfTrue_ Type;
};
@@ -53,6 +54,7 @@ namespace paludis
template <typename IfTrue_, typename IfFalse_>
struct Select<false, IfTrue_, IfFalse_>
{
+ /// Our value.
typedef IfFalse_ Type;
};
}
diff --git a/paludis/version_requirements.hh b/paludis/version_requirements.hh
index a9f56cc..24e7fdb 100644
--- a/paludis/version_requirements.hh
+++ b/paludis/version_requirements.hh
@@ -29,6 +29,13 @@ namespace paludis
{
#include <paludis/version_requirements-sr.hh>
+ /**
+ * A collection of VersionRequirement instances, usually for a
+ * PackageDepAtom.
+ *
+ * \see PackageDepAtom
+ * \ingroup grpversions
+ */
typedef SequentialCollection<VersionRequirement> VersionRequirements;
}