aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-19 21:53:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-19 21:53:23 +0000
commit91b4991cee3b7f086ec87e4fef652bab43c6fdc3 (patch)
tree596d30b1c1fdc76b75b39e49d95e8550a8674420
parent9c724bc1807b2938ab1832b2ecddedbcb3b3c43e (diff)
downloadpaludis-91b4991cee3b7f086ec87e4fef652bab43c6fdc3.tar.gz
paludis-91b4991cee3b7f086ec87e4fef652bab43c6fdc3.tar.xz
And the rest of the docs for paludis/
-rw-r--r--doc/doc_main.doxygen31
-rw-r--r--paludis/package_database.cc6
-rw-r--r--paludis/package_database.hh49
-rw-r--r--paludis/package_database_TEST.cc10
-rw-r--r--paludis/portage_repository.cc68
-rw-r--r--paludis/portage_repository.hh28
-rw-r--r--paludis/portage_repository_TEST.cc72
-rw-r--r--paludis/repository.cc6
-rw-r--r--paludis/repository.hh45
-rw-r--r--paludis/syncer.cc35
-rw-r--r--paludis/syncer.hh41
-rw-r--r--paludis/test_environment.cc6
-rw-r--r--paludis/test_environment.hh8
-rw-r--r--paludis/test_extras.cc21
-rw-r--r--paludis/vdb_repository.cc45
-rw-r--r--paludis/vdb_repository.hh40
-rw-r--r--paludis/vdb_repository_TEST.cc17
-rw-r--r--paludis/version_metadata.cc8
-rw-r--r--paludis/version_metadata.hh10
-rw-r--r--paludis/version_operator.cc8
-rw-r--r--paludis/version_operator.hh16
-rw-r--r--paludis/version_operator_TEST.cc8
-rw-r--r--paludis/version_spec.cc31
-rw-r--r--paludis/version_spec.hh16
-rw-r--r--paludis/version_spec_TEST.cc18
25 files changed, 574 insertions, 69 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index 1b428ff..677809e 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -39,17 +39,17 @@
* \ingroup grplibpaludis
*/
-/** \defgroup grpebuildinterface Ebuild interface
+/** \defgroup grphashedcontainers Hashed containers
*
* \ingroup grplibpaludis
*/
-/** \defgroup grphashedcontainers Hashed containers
+/** \defgroup grpnames Names
*
* \ingroup grplibpaludis
*/
-/** \defgroup grpnames Names
+/** \defgroup grpversions Versions
*
* \ingroup grplibpaludis
*/
@@ -78,6 +78,11 @@
* \ingroup grpenvironment
*/
+/** \defgroup grptestenvironment Test environment
+ *
+ * \ingroup grpenvironment
+ */
+
/** \defgroup grppackagedatabase Package database
*
* \ingroup grpenvironment
@@ -109,6 +114,26 @@
* \ingroup grprepository
*/
+/** \defgroup grpportagerepository Portage repository
+ *
+ * \ingroup grprepository
+ */
+
+/** \defgroup grpvdbrepository VDB repository
+ *
+ * \ingroup grprepository
+ */
+
+/** \defgroup grpebuildinterface Ebuild interface
+ *
+ * \ingroup grprepository
+ */
+
+/** \defgroup grpsyncer Sync protocol handler classes
+ *
+ * \ingroup grprepository
+ */
+
// ----- grpdepatoms Subgroups -----
/** \defgroup grpdepatomdumper Dep atom dumper
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index eb599cd..5820172 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -27,6 +27,10 @@
#include <map>
#include <set>
+/** \file
+ * Implementation of PackageDatabase.
+ */
+
using namespace paludis;
std::ostream &
@@ -72,6 +76,8 @@ namespace paludis
{
/**
* Implementation data for a PackageDatabase.
+ *
+ * \ingroup grppackagedatabase
*/
template<>
struct Implementation<PackageDatabase> :
diff --git a/paludis/package_database.hh b/paludis/package_database.hh
index 9d310db..8888cd7 100644
--- a/paludis/package_database.hh
+++ b/paludis/package_database.hh
@@ -41,6 +41,12 @@
#include <functional>
#include <iterator>
+/** \file
+ * Declarations for the PackageDatabase class and related utilities.
+ *
+ * \ingroup grppackagedatabase
+ */
+
namespace paludis
{
class PackageDepAtom;
@@ -48,6 +54,9 @@ namespace paludis
/**
* A PackageDatabaseError is an error that occurs when performing some
* operation upon a PackageDatabase.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class PackageDatabaseError : public Exception
{
@@ -61,6 +70,9 @@ namespace paludis
/**
* A PackageDatabaseLookupError descendent is thrown if an error occurs
* when looking for something in a PackageDatabase.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class PackageDatabaseLookupError : public PackageDatabaseError
{
@@ -75,8 +87,8 @@ namespace paludis
* Thrown if a PackageDatabase query results in more than one matching
* Package.
*
- * \ingroup Exception
- * \ingroup Database
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class AmbiguousPackageNameError : public PackageDatabaseLookupError
{
@@ -99,18 +111,30 @@ namespace paludis
{
}
+ /**
+ * The name of the package.
+ */
const std::string & name() const
{
return _name;
}
+ /**
+ * Iterator over possible matches.
+ */
typedef std::list<std::string>::const_iterator OptionsIterator;
+ /**
+ * Start of our options.
+ */
OptionsIterator begin_options() const
{
return _names.begin();
}
+ /**
+ * Past the end of our options.
+ */
OptionsIterator end_options() const
{
return _names.end();
@@ -131,6 +155,9 @@ namespace paludis
/**
* Thrown if a Repository with the same name as an existing member is added
* to a PackageDatabase.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class DuplicateRepositoryError : public PackageDatabaseError
{
@@ -144,6 +171,9 @@ namespace paludis
/**
* Thrown if there is no Package in a PackageDatabase with the given
* name.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class NoSuchPackageError : public PackageDatabaseLookupError
{
@@ -163,6 +193,9 @@ namespace paludis
{
}
+ /**
+ * Name of the package.
+ */
const std::string & name() const
{
return _name;
@@ -172,6 +205,9 @@ namespace paludis
/**
* Thrown if there is no Repository in a RepositoryDatabase with the given
* name.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class NoSuchRepositoryError : public PackageDatabaseLookupError
{
@@ -185,6 +221,9 @@ namespace paludis
/**
* Thrown if there is no Version in a PackageDatabase with the given
* name.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppackagedatabase
*/
class NoSuchVersionError : public PackageDatabaseLookupError
{
@@ -197,7 +236,9 @@ namespace paludis
};
/**
- * Do we want installed, uninstalled or either?
+ * Do we want installed, uninstalled or either when querying?
+ *
+ * \ingroup grppackagedatabase
*/
enum InstallState
{
@@ -208,6 +249,8 @@ namespace paludis
/**
* A PackageDatabase can be queried for Package instances.
+ *
+ * \ingroup grppackagedatabase
*/
class PackageDatabase :
private PrivateImplementationPattern<PackageDatabase>,
diff --git a/paludis/package_database_TEST.cc b/paludis/package_database_TEST.cc
index 116b166..695b569 100644
--- a/paludis/package_database_TEST.cc
+++ b/paludis/package_database_TEST.cc
@@ -26,12 +26,16 @@ using namespace test;
/** \file
* Test cases for package_database.hh.
+ *
+ * \ingroup grptestcases
*/
namespace test_cases
{
/**
* \test Basic PackageDatabase tests.
+ *
+ * \ingroup grptestcases
*/
struct PackageDatabaseTest : TestCase
{
@@ -46,6 +50,8 @@ namespace test_cases
/**
* \test PackageDatabase repository tests.
+ *
+ * \ingroup grptestcases
*/
struct PackageDatabaseRepositoryTest : TestCase
{
@@ -99,6 +105,8 @@ namespace test_cases
/**
* \test PackageDatabase query tests.
+ *
+ * \ingroup grptestcases
*/
struct PackageDatabaseQueryTest : TestCase
{
@@ -158,6 +166,8 @@ namespace test_cases
/**
* \test PackageDatabase disambiguate tests.
+ *
+ * \ingroup grptestcases
*/
struct PackageDatabaseDisambiguateTest : TestCase
{
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index 666d0a9..85c47a5 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -53,34 +53,42 @@
#include <strings.h>
#include <ctype.h>
+/** \file
+ * Implementation of PortageRepository.
+ *
+ * \ingroup grpportagerepository
+ */
+
using namespace paludis;
-typedef MakeHashedMap<QualifiedPackageName, VersionSpecCollection::Pointer>::Type VersionsMap;
+namespace paludis
+{
+ typedef MakeHashedMap<QualifiedPackageName, VersionSpecCollection::Pointer>::Type VersionsMap;
-typedef MakeHashedMap<QualifiedPackageName, PackageDepAtom::ConstPointer>::Type VirtualsMap;
+ typedef MakeHashedMap<QualifiedPackageName, PackageDepAtom::ConstPointer>::Type VirtualsMap;
-typedef MakeHashedMap<QualifiedPackageName, std::deque<PackageDepAtom::ConstPointer> >::Type RepositoryMaskMap;
+ typedef MakeHashedMap<QualifiedPackageName, std::deque<PackageDepAtom::ConstPointer> >::Type RepositoryMaskMap;
-typedef MakeHashedMap<CategoryNamePart, bool>::Type CategoryMap;
+ typedef MakeHashedMap<CategoryNamePart, bool>::Type CategoryMap;
-typedef MakeHashedMap<QualifiedPackageName, bool>::Type PackagesMap;
+ typedef MakeHashedMap<QualifiedPackageName, bool>::Type PackagesMap;
-typedef MakeHashedMap<UseFlagName, UseFlagState>::Type UseMap;
+ typedef MakeHashedMap<UseFlagName, UseFlagState>::Type UseMap;
-typedef MakeHashedSet<UseFlagName>::Type UseMaskSet;
+ typedef MakeHashedSet<UseFlagName>::Type UseMaskSet;
-typedef MakeHashedSet<UseFlagName>::Type UseFlagSet;
+ typedef MakeHashedSet<UseFlagName>::Type UseFlagSet;
-typedef MakeHashedMap<std::string, std::list<std::string> >::Type MirrorMap;
+ typedef MakeHashedMap<std::string, std::list<std::string> >::Type MirrorMap;
-typedef MakeHashedMap<std::pair<QualifiedPackageName, VersionSpec>, VersionMetadata::Pointer>::Type MetadataMap;
+ typedef MakeHashedMap<std::pair<QualifiedPackageName, VersionSpec>, VersionMetadata::Pointer>::Type MetadataMap;
-typedef MakeHashedMap<std::string, std::string>::Type ProfileEnvMap;
+ typedef MakeHashedMap<std::string, std::string>::Type ProfileEnvMap;
-namespace paludis
-{
/**
* Implementation data for a PortageRepository.
+ *
+ * \ingroup grpportagerepository
*/
template <>
struct Implementation<PortageRepository> :
@@ -453,23 +461,29 @@ PortageRepository::do_has_package_named(const CategoryNamePart & c,
}
}
-#ifndef DOXYGEN
-struct CategoryFilter :
- std::unary_function<bool, QualifiedPackageName>
+namespace
{
- CategoryNamePart category;
-
- CategoryFilter(const CategoryNamePart & c) :
- category(c)
+ /**
+ * Filter QualifiedPackageName instances by category.
+ *
+ * \ingroup grpportagerepository
+ */
+ struct CategoryFilter :
+ std::unary_function<bool, QualifiedPackageName>
{
- }
+ CategoryNamePart category;
- bool operator() (const QualifiedPackageName & a) const
- {
- return a.get<qpn_category>() == category;
- }
-};
-#endif
+ CategoryFilter(const CategoryNamePart & c) :
+ category(c)
+ {
+ }
+
+ bool operator() (const QualifiedPackageName & a) const
+ {
+ return a.get<qpn_category>() == category;
+ }
+ };
+}
CategoryNamePartCollection::ConstPointer
PortageRepository::do_category_names() const
diff --git a/paludis/portage_repository.hh b/paludis/portage_repository.hh
index d5c9ce7..11eb43b 100644
--- a/paludis/portage_repository.hh
+++ b/paludis/portage_repository.hh
@@ -29,12 +29,20 @@
/** \file
* Declaration for the PortageRepository class.
+ *
+ * \ingroup grpportagerepository
*/
namespace paludis
{
class PackageDatabase;
+ /**
+ * Keys for PortageRepositoryParams.
+ *
+ * \see PortageRepositoryParams
+ * \ingroup grpportagerepository
+ */
enum PortageRepositoryParamsKeys
{
prpk_environment,
@@ -50,6 +58,12 @@ namespace paludis
last_prpk
};
+ /**
+ * Tag for PortageRepositoryParams.
+ *
+ * \see PortageRepositoryParams
+ * \ingroup grpportagerepository
+ */
struct PortageRepositoryParamsTag :
SmartRecordTag<comparison_mode::NoComparisonTag, void>,
SmartRecordKeys<PortageRepositoryParamsKeys, last_prpk>,
@@ -66,11 +80,19 @@ namespace paludis
{
};
+ /**
+ * Constructor parameters for PortageRepository.
+ *
+ * \see PortageRepository
+ * \ingroup grpportagerepository
+ */
typedef MakeSmartRecord<PortageRepositoryParamsTag>::Type PortageRepositoryParams;
/**
* A PortageRepository is a Repository that handles the layout used by
* Portage for the main Gentoo tree.
+ *
+ * \ingroup grpportagerepository
*/
class PortageRepository : public Repository,
private PrivateImplementationPattern<PortageRepository>
@@ -178,7 +200,8 @@ namespace paludis
* Thrown if invalid parameters are provided for
* PortageRepository::make_portage_repository.
*
- * \ingroup Exception
+ * \ingroup grpexceptions
+ * \ingroup grpportagerepository
*/
class PortageRepositoryConfigurationError : public ConfigurationError
{
@@ -189,6 +212,9 @@ namespace paludis
PortageRepositoryConfigurationError(const std::string & msg) throw ();
};
+ /**
+ * Register PortageRepository.
+ */
static const RepositoryMaker::RegisterMaker register_portage_repository(
"portage", &PortageRepository::make_portage_repository);
diff --git a/paludis/portage_repository_TEST.cc b/paludis/portage_repository_TEST.cc
index ce718f7..f987bd4 100644
--- a/paludis/portage_repository_TEST.cc
+++ b/paludis/portage_repository_TEST.cc
@@ -28,11 +28,16 @@ using namespace paludis;
/** \file
* Test cases for PortageRepository.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
namespace test_cases
{
+ /**
+ * \test Test PortageRepository repository names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryRepoNameTest : TestCase
{
PortageRepositoryRepoNameTest() : TestCase("repo name") { }
@@ -50,6 +55,11 @@ namespace test_cases
}
} test_portage_repository_repo_name;
+ /**
+ * \test Test PortageRepository repository with no names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryNoRepoNameTest : TestCase
{
PortageRepositoryNoRepoNameTest() : TestCase("no repo name") { }
@@ -67,6 +77,11 @@ namespace test_cases
}
} test_portage_repository_no_repo_name;
+ /**
+ * \test Test PortageRepository repository empty names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryEmptyRepoNameTest : TestCase
{
PortageRepositoryEmptyRepoNameTest() : TestCase("empty repo name") { }
@@ -84,6 +99,11 @@ namespace test_cases
}
} test_portage_repository_empty_repo_name;
+ /**
+ * \test Test PortageRepository repository has_category_named.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryHasCategoryNamedTest : TestCase
{
PortageRepositoryHasCategoryNamedTest() : TestCase("has category named") { }
@@ -110,6 +130,11 @@ namespace test_cases
}
} test_portage_repository_has_category_named;
+ /**
+ * \test Test PortageRepository category_names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryCategoryNamesTest : TestCase
{
PortageRepositoryCategoryNamesTest() : TestCase("category names") { }
@@ -138,6 +163,11 @@ namespace test_cases
}
} test_portage_repository_category_names;
+ /**
+ * \test Test PortageRepository has_package_named.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryHasPackageNamedTest : TestCase
{
PortageRepositoryHasPackageNamedTest() : TestCase("has package named") { }
@@ -172,6 +202,11 @@ namespace test_cases
}
} test_portage_repository_has_package_named;
+ /**
+ * \test Test PortageRepository has_package_named cached.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryHasPackageNamedCachedTest : TestCase
{
PortageRepositoryHasPackageNamedCachedTest() : TestCase("has package named cached") { }
@@ -210,6 +245,11 @@ namespace test_cases
}
} test_portage_repository_has_package_named_cached;
+ /**
+ * \test Test PortageRepository package_names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryPackageNamesTest : TestCase
{
PortageRepositoryPackageNamesTest() : TestCase("package names") { }
@@ -257,6 +297,11 @@ namespace test_cases
}
} test_portage_repository_package_names;
+ /**
+ * \test Test PortageRepository bad package names.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryBadPackageNamesTest : TestCase
{
PortageRepositoryBadPackageNamesTest() : TestCase("bad package names") { }
@@ -285,6 +330,11 @@ namespace test_cases
}
} test_portage_repository_bad_package_names;
+ /**
+ * \test Test PortageRepository has_version.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryHasVersionTest : TestCase
{
PortageRepositoryHasVersionTest() : TestCase("has version") { }
@@ -323,6 +373,11 @@ namespace test_cases
}
} test_portage_repository_has_version;
+ /**
+ * \test Test PortageRepository versions.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryVersionsTest : TestCase
{
PortageRepositoryVersionsTest() : TestCase("versions") { }
@@ -360,6 +415,11 @@ namespace test_cases
}
} test_portage_repository_versions;
+ /**
+ * \test Test PortageRepository duff versions.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryDuffVersionsTest : TestCase
{
PortageRepositoryDuffVersionsTest() : TestCase("duff versions") { }
@@ -397,6 +457,11 @@ namespace test_cases
}
} test_portage_repository_duff_versions;
+ /**
+ * \test Test PortageRepository cached metadata.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryMetadataCachedTest : TestCase
{
PortageRepositoryMetadataCachedTest() : TestCase("metadata cached") { }
@@ -428,6 +493,11 @@ namespace test_cases
}
} test_portage_repository_metadata_cached;
+ /**
+ * \test Test PortageRepository uncached metadata.
+ *
+ * \ingroup grptestcases
+ */
struct PortageRepositoryMetadataUncachedTest : TestCase
{
PortageRepositoryMetadataUncachedTest() : TestCase("metadata uncached") { }
diff --git a/paludis/repository.cc b/paludis/repository.cc
index 6deb334..4f8c5af 100644
--- a/paludis/repository.cc
+++ b/paludis/repository.cc
@@ -19,6 +19,12 @@
#include <paludis/repository.hh>
+/** \file
+ * Implementation of Repository.
+ *
+ * \ingroup grprepository
+ */
+
using namespace paludis;
Repository::Repository(const RepositoryName & name) :
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 477e741..319d6e3 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -35,6 +35,8 @@
/** \file
* Declarations for the Repository class.
+ *
+ * \ingroup grprepository
*/
namespace paludis
@@ -43,6 +45,9 @@ namespace paludis
/**
* Keys for InstallOptions.
+ *
+ * \see InstallOptions
+ * \ingroup grprepository
*/
enum InstallOptionsKeys
{
@@ -53,6 +58,9 @@ namespace paludis
/**
* Tag for InstallOptions.
+ *
+ * \see InstallOptions
+ * \ingroup grprepository
*/
struct InstallOptionsTag :
SmartRecordTag<comparison_mode::NoComparisonTag, void>,
@@ -64,6 +72,8 @@ namespace paludis
/**
* Defines various options for package installation.
+ *
+ * \ingroup grprepository
*/
typedef MakeSmartRecord<InstallOptionsTag>::Type InstallOptions;
@@ -73,6 +83,8 @@ namespace paludis
*
* We make pretty heavy use of the non-virtual interface idiom here. See
* \ref EffCpp items 35 and 37.
+ *
+ * \ingroup grprepository
*/
class Repository :
private InstantiationPolicy<Repository, instantiation_method::NonCopyableTag>,
@@ -458,20 +470,37 @@ namespace paludis
*/
virtual void invalidate() const = 0;
+ /**
+ * Our provide map iterator type.
+ */
typedef std::map<QualifiedPackageName, QualifiedPackageName>::const_iterator ProvideMapIterator;
+ /**
+ * Start of our provide map.
+ */
virtual ProvideMapIterator begin_provide_map() const = 0;
+ /**
+ * Past the end of our provide map.
+ */
virtual ProvideMapIterator end_provide_map() const = 0;
+ /**
+ * Add this package to world.
+ */
virtual void add_to_world(const QualifiedPackageName &) const = 0;
+
+ /**
+ * Remove this package from world, if it is present.
+ */
virtual void remove_from_world(const QualifiedPackageName &) const = 0;
};
/**
* Thrown if a repository of the specified type does not exist.
*
- * \ingroup Exception
+ * \ingroup grpexceptions
+ * \ingroup grprepository
*/
class NoSuchRepositoryTypeError : public ConfigurationError
{
@@ -485,7 +514,8 @@ namespace paludis
/**
* Parent class for install, uninstall errors.
*
- * \ingroup Exception
+ * \ingroup grpexceptions
+ * \ingroup grprepository
*/
class PackageActionError : public Exception
{
@@ -496,7 +526,8 @@ namespace paludis
/**
* Thrown if an install fails.
*
- * \ingroup Exception.
+ * \ingroup grprepository
+ * \ingroup grpexceptions
*/
class PackageInstallActionError : public PackageActionError
{
@@ -507,7 +538,8 @@ namespace paludis
/**
* Thrown if a fetch fails.
*
- * \ingroup Exception.
+ * \ingroup grpexceptions
+ * \ingroup grprepository
*/
class PackageFetchActionError : public PackageActionError
{
@@ -518,7 +550,8 @@ namespace paludis
/**
* Thrown if an uninstall fails.
*
- * \ingroup Exception.
+ * \ingroup grprepository
+ * \ingroup grpexceptions
*/
class PackageUninstallActionError : public PackageActionError
{
@@ -530,6 +563,8 @@ namespace paludis
/**
* Virtual constructor for repositories.
+ *
+ * \ingroup grprepository
*/
typedef VirtualConstructor<std::string,
Repository::Pointer (*) (const Environment * const, const PackageDatabase * const,
diff --git a/paludis/syncer.cc b/paludis/syncer.cc
index 1536b10..7f63bac 100644
--- a/paludis/syncer.cc
+++ b/paludis/syncer.cc
@@ -21,6 +21,14 @@
#include "syncer.hh"
#include <paludis/util/system.hh>
+/** \file
+ * Implementation for Syncer classes.
+ *
+ * \ingroup grpsyncer
+ */
+
+using namespace paludis;
+
NoSuchSyncerError::NoSuchSyncerError(const std::string & format) throw () :
SyncFailedError("No such syncer for format '" + format + "'")
{
@@ -28,6 +36,11 @@ NoSuchSyncerError::NoSuchSyncerError(const std::string & format) throw () :
namespace
{
+ /**
+ * A Syncer for rsync:// syncing.
+ *
+ * \ingroup grpsyncer
+ */
class RsyncSyncer :
public Syncer
{
@@ -51,6 +64,11 @@ namespace
}
};
+ /**
+ * A Syncer for svn:// (subversion) syncing.
+ *
+ * \ingroup grpsyncer
+ */
class SvnSyncer :
public Syncer
{
@@ -73,8 +91,25 @@ namespace
}
};
+ /**
+ * Register rsync:// protocol.
+ *
+ * \ingroup grpsyncer
+ */
static const SyncerMaker::RegisterMaker register_rsync_syncer("rsync", &RsyncSyncer::make);
+
+ /**
+ * Register svn:// protocol.
+ *
+ * \ingroup grpsyncer
+ */
static const SyncerMaker::RegisterMaker register_svn_syncer("svn", &SvnSyncer::make);
+
+ /**
+ * Register svn+ssh:// protocol.
+ *
+ * \ingroup grpsyncer
+ */
static const SyncerMaker::RegisterMaker register_svnplusssh_syncer("svn+ssh", &SvnSyncer::make);
}
diff --git a/paludis/syncer.hh b/paludis/syncer.hh
index 9d29f1c..2257ac3 100644
--- a/paludis/syncer.hh
+++ b/paludis/syncer.hh
@@ -25,12 +25,19 @@
#include <paludis/repository.hh>
#include <string>
-using namespace paludis;
+/** \file
+ * Declarations for the Syncer classes.
+ *
+ * \ingroup grpsyncer
+ */
namespace paludis
{
/**
- * Keys for SyncOptions
+ * Keys for SyncOptions.
+ *
+ * \see SyncOptions
+ * \ingroup grpsyncer
*/
enum SyncOptionsKeys
{
@@ -40,6 +47,9 @@ namespace paludis
/**
* Tag for SyncOptions.
+ *
+ * \see SyncOptions
+ * \ingroup grpsyncer
*/
struct SyncOptionsTag :
SmartRecordTag<comparison_mode::NoComparisonTag, void>,
@@ -50,30 +60,47 @@ namespace paludis
/**
* Defines options to be passed to the syncer.
+ *
+ * \ingroup grpsyncer
*/
typedef MakeSmartRecord<SyncOptionsTag>::Type SyncOptions;
+ /**
+ * A Syncer subclass handles syncing Repository instances.
+ *
+ * \ingroup grpsyncer
+ */
class Syncer :
private InstantiationPolicy<Syncer, instantiation_method::NonCopyableTag>,
public InternalCounted<Syncer>
{
protected:
+ /**
+ * Constructor.
+ */
Syncer()
{
}
public:
+ /**
+ * Destructor.
+ */
virtual ~Syncer()
{
}
+ /**
+ * Perform the sync.
+ */
virtual void sync(const SyncOptions &) const = 0;
};
/**
* Thrown if a sync fails.
*
- * \ingroup Exception
+ * \ingroup grpsyncer
+ * \ingroup grpexceptions
*/
class SyncFailedError :
public PackageActionError
@@ -91,7 +118,8 @@ namespace paludis
/**
* Thrown if a syncer of the specified type does not exist.
*
- * \ingroup Exception
+ * \ingroup grpsyncer
+ * \ingroup grpexceptions
*/
class NoSuchSyncerError : public SyncFailedError
{
@@ -103,6 +131,11 @@ namespace paludis
};
+ /**
+ * Virtual constructor for Syncer subclasses.
+ *
+ * \ingroup grpsyncer
+ */
typedef VirtualConstructor<std::string, Syncer::Pointer (*) (const std::string &, const std::string &),
virtual_constructor_not_found::ThrowException<NoSuchSyncerError> > SyncerMaker;
}
diff --git a/paludis/test_environment.cc b/paludis/test_environment.cc
index 3f2fd60..6e54d09 100644
--- a/paludis/test_environment.cc
+++ b/paludis/test_environment.cc
@@ -19,6 +19,12 @@
#include <paludis/test_environment.hh>
+/** \file
+ * Implementation of TestEnvironment.
+ *
+ * \ingroup grptestenvironment
+ */
+
using namespace paludis;
TestEnvironment::TestEnvironment() :
diff --git a/paludis/test_environment.hh b/paludis/test_environment.hh
index 9de4ae1..5fe759a 100644
--- a/paludis/test_environment.hh
+++ b/paludis/test_environment.hh
@@ -23,12 +23,20 @@
#include <paludis/package_database.hh>
#include <paludis/qa/environment.hh>
+/** \file
+ * Declarations for the TestEnvironment class.
+ *
+ * \ingroup grptestenvironment
+ */
+
namespace paludis
{
/**
* A TestEnvironment is an environment used during testing that lets us
* control all the options rather than reading them from configuration
* files.
+ *
+ * \ingroup grptestenvironment
*/
class TestEnvironment : public Environment
{
diff --git a/paludis/test_extras.cc b/paludis/test_extras.cc
index 03348dd..e7fbac8 100644
--- a/paludis/test_extras.cc
+++ b/paludis/test_extras.cc
@@ -25,13 +25,29 @@
#include <sstream>
#include <test/test_framework.hh>
+/** \file
+ * Extra settings for test cases.
+ *
+ * \ingroup grptestcases
+ */
+
using namespace paludis;
namespace
{
+ /**
+ * Convert an exception to a debug string.
+ *
+ * \ingroup grptestcases
+ */
std::string verbose_exception_to_debug_string(
const std::exception & e) PALUDIS_ATTRIBUTE((noinline));
+ /**
+ * Avoid logging visibly.
+ *
+ * \ingroup grptestcases
+ */
struct C
{
std::stringstream s;
@@ -43,6 +59,11 @@ namespace
}
};
+ /**
+ * Avoid logging visibly.
+ *
+ * \ingroup grptestcases
+ */
static const C my_c;
std::string verbose_exception_to_debug_string(const std::exception & e)
diff --git a/paludis/vdb_repository.cc b/paludis/vdb_repository.cc
index bfd3b1c..c2158af 100644
--- a/paludis/vdb_repository.cc
+++ b/paludis/vdb_repository.cc
@@ -41,17 +41,34 @@
#include <algorithm>
#include <vector>
+/** \file
+ * Implementation for VDBRepository.
+ *
+ * \ingroup grpvdbrepository
+ */
+
using namespace paludis;
namespace
{
+ /**
+ * Holds an entry in a VDB.
+ */
struct VDBEntry
{
+ /// Our package name.
QualifiedPackageName name;
+
+ /// Our package version.
VersionSpec version;
+
+ /// Our metadata, may be zero.
VersionMetadata::Pointer metadata;
+
+ /// Our built USE flags.
std::set<UseFlagName> use;
+ /// Constructor
VDBEntry(const QualifiedPackageName & n, const VersionSpec & v) :
name(n),
version(v),
@@ -59,6 +76,7 @@ namespace
{
}
+ /// Comparison operator
bool operator< (const VDBEntry & other) const
{
if (name < other.name)
@@ -70,6 +88,11 @@ namespace
return false;
}
+ /**
+ * Compare a VDBEntry by category only.
+ *
+ * \ingroup grpvdbrepository
+ */
struct CompareCategory
{
bool operator() (const CategoryNamePart & c, const VDBEntry & e) const
@@ -83,6 +106,11 @@ namespace
}
};
+ /**
+ * Compare a VDBEntry by name only.
+ *
+ * \ingroup grpvdbrepository
+ */
struct ComparePackage
{
bool operator() (const QualifiedPackageName & c, const VDBEntry & e) const
@@ -96,6 +124,11 @@ namespace
}
};
+ /**
+ * Compare a VDBEntry by name and version.
+ *
+ * \ingroup grpvdbrepository
+ */
struct CompareVersion
{
bool operator() (const std::pair<QualifiedPackageName, VersionSpec> & c,
@@ -129,6 +162,11 @@ namespace
namespace paludis
{
+ /**
+ * Implementation data for VDBRepository.
+ *
+ * \ingroup grpvdbrepository
+ */
template <>
struct Implementation<VDBRepository> :
InternalCounted<Implementation<VDBRepository> >
@@ -151,7 +189,7 @@ namespace paludis
/// Do we have entries loaded?
mutable bool entries_valid;
- /// Our entries.
+ /// Our entries, keep this sorted!
mutable std::vector<VDBEntry> entries;
/// Load entries.
@@ -235,6 +273,11 @@ Implementation<VDBRepository>::invalidate() const
namespace
{
+ /**
+ * Fetch the contents of a VDB file.
+ *
+ * \ingroup grpvdbrepository
+ */
std::string
file_contents(const FSEntry & location, const QualifiedPackageName & name,
const VersionSpec & v, const std::string & key)
diff --git a/paludis/vdb_repository.hh b/paludis/vdb_repository.hh
index 5b6a9c2..a0ab204 100644
--- a/paludis/vdb_repository.hh
+++ b/paludis/vdb_repository.hh
@@ -26,8 +26,20 @@
#include <paludis/util/smart_record.hh>
#include <paludis/util/fs_entry.hh>
+/** \file
+ * Declarations for VDBRepository.
+ *
+ * \ingroup grpvdbrepository
+ */
+
namespace paludis
{
+ /**
+ * Keys for VDBRepositoryParams
+ *
+ * \see VDBRepositoryParams
+ * \ingroup grpvdbrepository
+ */
enum VDBRepositoryParamsKeys
{
vdbrpk_environment,
@@ -38,6 +50,12 @@ namespace paludis
last_vdbrpk
};
+ /**
+ * Tag for VDBRepositoryParams.
+ *
+ * \see VDBRepositoryParams
+ * \ingroup grpvdbrepository
+ */
struct VDBRepositoryParamsTag :
SmartRecordTag<comparison_mode::NoComparisonTag, void>,
SmartRecordKeys<VDBRepositoryParamsKeys, last_vdbrpk>,
@@ -49,8 +67,22 @@ namespace paludis
{
};
+ /**
+ * Constructor parameters for VDBRepository.
+ *
+ * \see VDBRepository
+ * \ingroup grpvdbrepository
+ */
typedef MakeSmartRecord<VDBRepositoryParamsTag>::Type VDBRepositoryParams;
+ /**
+ * A VDBRepository represents the /var/db/pkg database used for
+ * installed packages.
+ *
+ * It has a stupid name because Portage called it that.
+ *
+ * \ingroup grpvdbrepository
+ */
class VDBRepository :
public Repository,
public PrivateImplementationPattern<VDBRepository>
@@ -143,7 +175,8 @@ namespace paludis
* Thrown if invalid parameters are provided for
* PortageRepository::make_portage_repository.
*
- * \ingroup Exception
+ * \ingroup grpvdbrepository
+ * \ingroup grpexceptions
*/
class VDBRepositoryConfigurationError : public ConfigurationError
{
@@ -154,6 +187,11 @@ namespace paludis
VDBRepositoryConfigurationError(const std::string & msg) throw ();
};
+ /**
+ * Register the VDB repository format.
+ *
+ * \ingroup grpvdbrepository
+ */
static const RepositoryMaker::RegisterMaker register_vdb_repository(
"vdb", &VDBRepository::make_vdb_repository);
}
diff --git a/paludis/vdb_repository_TEST.cc b/paludis/vdb_repository_TEST.cc
index d25e01e..089aba2 100644
--- a/paludis/vdb_repository_TEST.cc
+++ b/paludis/vdb_repository_TEST.cc
@@ -28,11 +28,16 @@ using namespace paludis;
/** \file
* Test cases for VDBRepository.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
namespace test_cases
{
+ /**
+ * \test Test VDBRepository repo names
+ *
+ * \ingroup grptestcases
+ */
struct VDBRepositoryRepoNameTest : TestCase
{
VDBRepositoryRepoNameTest() : TestCase("repo name") { }
@@ -49,6 +54,11 @@ namespace test_cases
}
} test_vdb_repository_repo_name;
+ /**
+ * \test Test VDBRepository has_category_named
+ *
+ * \ingroup grptestcases
+ */
struct VDBRepositoryHasCategoryNamedTest : TestCase
{
VDBRepositoryHasCategoryNamedTest() : TestCase("has category named") { }
@@ -68,6 +78,11 @@ namespace test_cases
}
} test_vdb_repository_has_category_named;
+ /**
+ * \test Test VDBRepository query_use
+ *
+ * \ingroup grptestcases
+ */
struct VDBRepositoryQueryUseTest : TestCase
{
VDBRepositoryQueryUseTest() : TestCase("query USE") { }
diff --git a/paludis/version_metadata.cc b/paludis/version_metadata.cc
index 39d7a65..47396f2 100644
--- a/paludis/version_metadata.cc
+++ b/paludis/version_metadata.cc
@@ -22,12 +22,20 @@
#include <paludis/version_metadata.hh>
#include <vector>
+/** \file
+ * Implementation of VersionMetadata.
+ *
+ * \ingroup grpversions
+ */
+
using namespace paludis;
namespace paludis
{
/**
* Implementation data for VersionMetadata.
+ *
+ * \ingroup grpversions
*/
template <>
struct Implementation<VersionMetadata> :
diff --git a/paludis/version_metadata.hh b/paludis/version_metadata.hh
index 6e628fe..a71be4e 100644
--- a/paludis/version_metadata.hh
+++ b/paludis/version_metadata.hh
@@ -27,10 +27,18 @@
#include <set>
#include <string>
+/** \file
+ * Declarations for the VersionMetadata class.
+ *
+ * \ingroup grpversions
+ */
+
namespace paludis
{
/**
* Represents a VersionMetadata key value.
+ *
+ * \ingroup grpversions
*/
enum VersionMetadataKey
{
@@ -56,6 +64,8 @@ namespace paludis
/**
* Holds the metadata associated with a particular version.
+ *
+ * \ingroup grpversions
*/
class VersionMetadata :
private InstantiationPolicy<VersionMetadata, instantiation_method::NonCopyableTag>,
diff --git a/paludis/version_operator.cc b/paludis/version_operator.cc
index 35f2d65..796717e 100644
--- a/paludis/version_operator.cc
+++ b/paludis/version_operator.cc
@@ -20,6 +20,12 @@
#include <paludis/util/stringify.hh>
#include <paludis/version_operator.hh>
+/** \file
+ * Implementation for VersionOperator.
+ *
+ * \ingroup grpversions
+ */
+
using namespace paludis;
VersionOperatorValue
@@ -104,8 +110,6 @@ paludis::operator<< (std::ostream & s, const VersionOperator & v)
return s;
}
-// The function below makes Doxygen crap itself... It's a bug in doxygen, not
-// a genuinely undocumented function.
bool (VersionSpec::* VersionOperator::as_version_spec_operator() const)(const VersionSpec &) const
{
switch (_v)
diff --git a/paludis/version_operator.hh b/paludis/version_operator.hh
index 7577bdb..94d69c1 100644
--- a/paludis/version_operator.hh
+++ b/paludis/version_operator.hh
@@ -29,7 +29,7 @@
/** \file
* Declarations for the VersionOperator class.
*
- * \ingroup DepResolver
+ * \ingroup grpversions
*/
namespace paludis
@@ -37,7 +37,7 @@ namespace paludis
/**
* Represents an operator attached to a VersionSpec.
*
- * \ingroup DepResolver
+ * \ingroup grpversions
*/
enum VersionOperatorValue
{
@@ -54,7 +54,7 @@ namespace paludis
/**
* An operator attached to a VersionSpec, validated.
*
- * \ingroup DepResolver
+ * \ingroup grpversions
*/
class VersionOperator : public ComparisonPolicy<VersionOperator,
comparison_mode::EqualityComparisonTag,
@@ -111,6 +111,12 @@ namespace paludis
bool (VersionSpec::* as_version_spec_operator() const)(const VersionSpec &) const;
};
+ /**
+ * Thrown if a bad version operator is encountered.
+ *
+ * \ingroup grpversions
+ * \ingroup grpexceptions
+ */
class BadVersionOperatorError :
public Exception
{
@@ -119,7 +125,9 @@ namespace paludis
};
/**
- * A VersionOperator can be written to an ostreams
+ * A VersionOperator can be written to an ostream.
+ *
+ * \ingroup grpversions
*/
std::ostream & operator<< (std::ostream & s, const VersionOperator &);
}
diff --git a/paludis/version_operator_TEST.cc b/paludis/version_operator_TEST.cc
index 75657d2..c6fb4a9 100644
--- a/paludis/version_operator_TEST.cc
+++ b/paludis/version_operator_TEST.cc
@@ -27,7 +27,7 @@ using namespace paludis;
/** \file
* Test cases for version_operator.hh.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
namespace test_cases
@@ -35,7 +35,7 @@ namespace test_cases
/**
* \test Test VersionOperator creation and assignment.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionOperatorTest : TestCase
{
@@ -69,7 +69,7 @@ namespace test_cases
/**
* \test Test VersionOperator creation and assignment from a string.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionOperatorFromStringTest : TestCase
{
@@ -97,7 +97,7 @@ namespace test_cases
/**
* \test Test VersionOperator stringification.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionOperatorToStringTest : TestCase
{
diff --git a/paludis/version_spec.cc b/paludis/version_spec.cc
index 5f2e0ba..09b275c 100644
--- a/paludis/version_spec.cc
+++ b/paludis/version_spec.cc
@@ -24,6 +24,12 @@
#include <vector>
#include <limits>
+/** \file
+ * Implementation of VersionSpec.
+ *
+ * \ingroup grpversions
+ */
+
using namespace paludis;
BadVersionSpecError::BadVersionSpecError(const std::string & name) throw () :
@@ -33,6 +39,11 @@ BadVersionSpecError::BadVersionSpecError(const std::string & name) throw () :
namespace
{
+ /**
+ * Type of a Part in a VersionSpec data vector.
+ *
+ * \ingroup grpversions
+ */
enum PartKind
{
alpha,
@@ -47,6 +58,12 @@ namespace
scm
};
+ /**
+ * Keys for a Part.
+ *
+ * \see Part
+ * \ingroup grpversions
+ */
enum PartKeys
{
part_kind,
@@ -54,6 +71,12 @@ namespace
last_part
};
+ /**
+ * Tag for a Part.
+ *
+ * \see Part
+ * \ingroup grpversions
+ */
struct PartTag :
SmartRecordTag<comparison_mode::FullComparisonTag, comparison_method::SmartRecordCompareByAllTag>,
SmartRecordKeys<PartKeys, last_part>,
@@ -62,6 +85,9 @@ namespace
{
};
+ /**
+ * An entry in a VersionSpec data vector.
+ */
typedef MakeSmartRecord<PartTag>::Type Part;
}
@@ -323,6 +349,11 @@ VersionSpec::hash_value() const
namespace
{
+ /**
+ * Identify Part instances that are revisions.
+ *
+ * \ingroup grpversions
+ */
struct IsRevisionPart
{
bool operator() (const Part & p) const
diff --git a/paludis/version_spec.hh b/paludis/version_spec.hh
index 913fd1d..523ac15 100644
--- a/paludis/version_spec.hh
+++ b/paludis/version_spec.hh
@@ -27,13 +27,19 @@
#include <paludis/util/collection.hh>
#include <string>
+/** \file
+ * Declarations of the VersionSpec class.
+ *
+ * \ingroup grpversions
+ */
+
namespace paludis
{
/**
* Thrown if a VersionSpec is created from an invalid version string.
*
- * \ingroup Exception
- * \ingroup Database
+ * \ingroup grpexceptions
+ * \ingroup grpversions
*/
class BadVersionSpecError : public NameError
{
@@ -46,6 +52,8 @@ namespace paludis
/**
* A VersionSpec represents a version number (for example, 1.2.3b-r1).
+ *
+ * \ingroup grpversions
*/
class VersionSpec : private PrivateImplementationPattern<VersionSpec>,
public ComparisonPolicy<VersionSpec, comparison_mode::FullComparisonTag,
@@ -110,11 +118,15 @@ namespace paludis
/**
* Output a VersionSpec to a stream.
+ *
+ * \ingroup grpversions
*/
std::ostream & operator<< (std::ostream &, const VersionSpec &);
/**
* Holds a collection of VersionSpec instances.
+ *
+ * \ingroup grpversions
*/
typedef SortedCollection<VersionSpec> VersionSpecCollection;
}
diff --git a/paludis/version_spec_TEST.cc b/paludis/version_spec_TEST.cc
index c1c8a3a..2ce9f8c 100644
--- a/paludis/version_spec_TEST.cc
+++ b/paludis/version_spec_TEST.cc
@@ -29,9 +29,7 @@ using namespace paludis;
/** \file
* Test cases for VersionSpec.
*
- * \todo This needs lots of work.
- *
- * \ingroup Test
+ * \ingroup grptestcases
*/
namespace test_cases
@@ -39,7 +37,7 @@ namespace test_cases
/**
* \test Basic version_spec creation.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionSpecCreationTest : TestCase
{
@@ -79,7 +77,7 @@ namespace test_cases
/**
* \test Invalid version rejection
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionSpecRejectTest : TestCase
{
@@ -101,7 +99,7 @@ namespace test_cases
/**
* \test Not so basic version_spec creation.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionSpecParseTest : TestCase
{
@@ -119,7 +117,7 @@ namespace test_cases
/**
* \test VersionSpec star comparisons
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionSpecStarCompareTest : TestCase
{
@@ -145,7 +143,7 @@ namespace test_cases
/**
* \test VersionSpec remove revision
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionRemoveRevisionTest : TestCase
{
@@ -162,7 +160,7 @@ namespace test_cases
/**
* \test VersionSpec revision only
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionRevisionOnlyTest : TestCase
{
@@ -179,7 +177,7 @@ namespace test_cases
/**
* \test VersionSpec ordering.
*
- * \ingroup Test
+ * \ingroup grptestcases
*/
struct VersionSpecCompareSCMTest : TestCase
{