aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-13 16:20:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-13 16:20:04 +0000
commit1819e7a1858fa061f9e69ecef64062d434cc2c01 (patch)
tree7f4a7c9aced15fb99cb63bf132fe2acd70a12a95
parent4bfec25e5ecb93c688205b37bc07cd6bd78484dc (diff)
downloadpaludis-1819e7a1858fa061f9e69ecef64062d434cc2c01.tar.gz
paludis-1819e7a1858fa061f9e69ecef64062d434cc2c01.tar.xz
Doxygen work.
-rw-r--r--doc/doc_main.doxygen2
-rw-r--r--doc/doxygen.conf.in2
-rw-r--r--paludis/config_file.hh162
-rw-r--r--paludis/dep_list/dep_list.sr12
-rw-r--r--paludis/dep_spec.hh12
-rw-r--r--paludis/environment.hh27
-rw-r--r--paludis/repository.hh2
-rw-r--r--paludis/repository.sr34
-rw-r--r--paludis/util/exception.hh1
-rw-r--r--paludis/util/files.m42
-rw-r--r--paludis/util/iterator.hh5
-rw-r--r--paludis/util/sr.cc25
-rw-r--r--paludis/util/sr.hh3
-rw-r--r--paludis/version_metadata.cc2
-rw-r--r--paludis/version_metadata.hh2
-rw-r--r--paludis/version_requirements.sr13
16 files changed, 275 insertions, 31 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index 8e6b956..267449d 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -239,7 +239,7 @@
/** \defgroup grpuninstalllist Uninstall (reverse dependency) resolution
*
- * \ingroup grpuninstalllist
+ * \ingroup grpdependencies
*/
/** \defgroup grpdepspecs Dependency specs
diff --git a/doc/doxygen.conf.in b/doc/doxygen.conf.in
index 7a8bd53..13f58e8 100644
--- a/doc/doxygen.conf.in
+++ b/doc/doxygen.conf.in
@@ -461,7 +461,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = ../paludis ../paludis/digests ../paludis/tasks ../paludis/environments ../paludis/environments/no_config ../paludis/environments/test ../paludis/environments/paludis ../paludis/qa ../paludis/selinux ../paludis/util ../paludis/merger ../paludis/repositories ../paludis/repositories/cran ../paludis/repositories/virtuals ../paludis/repositories/gentoo ../paludis/repositories/fake ../paludis/args ../paludis/dep_list ../doc ../test
+INPUT = ../paludis ../paludis/args ../paludis/dep_list ../paludis/digests ../paludis/environments ../paludis/environments/no_config ../paludis/environments/portage ../paludis/environments/paludis ../paludis/environments/test ../paludis/fetchers ../paludis/merger ../paludis/qa ../paludis/repositories ../paludis/repositories/cran ../paludis/repositories/fake ../paludis/repositories/gems ../paludis/repositories/gentoo ../paludis/repositories/virtuals ../paludis/selinux ../paludis/syncers ../paludis/tasks ../paludis/util ../doc
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/paludis/config_file.hh b/paludis/config_file.hh
index 9abea8a..5cfe5f8 100644
--- a/paludis/config_file.hh
+++ b/paludis/config_file.hh
@@ -41,22 +41,69 @@ namespace paludis
{
class FSEntry;
+ /**
+ * Raised if an error is encountered parsing a configuration file.
+ *
+ * \ingroup grpconfigfile
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
class ConfigFileError :
public ConfigurationError
{
public:
+ ///\name Basic operations
+ ///\{
+
+ /**
+ * Constructor, where the filename is known.
+ *
+ * \param filename The filename in which the error occurred. May be a blank string, if
+ * the filename is not necessarily known.
+ * \param message A description of the error.
+ */
ConfigFileError(const std::string & filename, const std::string & message) throw ();
+
+ /**
+ * Constructor, where the filename is not known.
+ *
+ * \param message A description of the error.
+ */
ConfigFileError(const std::string & message) throw ();
+
+ ///\}
};
+ /**
+ * Base class for configuration files.
+ *
+ * Data is read in from a ConfigFile::Source instance, which can be created from
+ * an FSEntry, a std::istream or a string.
+ *
+ * \see KeyValueConfigFile
+ * \see LineConfigFile
+ *
+ * \ingroup grpconfigfile
+ * \nosubgrouping
+ */
class ConfigFile :
private InstantiationPolicy<ConfigFile, instantiation_method::NonCopyableTag>
{
public:
+ /**
+ * A source (for example, a file or a string) usable by ConfigFile.
+ *
+ * \see ConfigFile
+ * \ingroup grpconfigfile
+ * \nosubgrouping
+ */
class Source :
private PrivateImplementationPattern<Source>
{
public:
+ ///\name Basic operations
+ ///\{
+
Source(const FSEntry &);
Source(const std::string &);
Source(std::istream &);
@@ -66,47 +113,115 @@ namespace paludis
~Source();
+ ///\}
+
+ /**
+ * Our stream, for use by ConfigFile.
+ */
std::istream & stream() const;
+
+ /**
+ * Our filename (may be empty), for use by ConfigFile.
+ */
std::string filename() const;
};
+ ///\name Basic operations
+ ///\{
+
virtual ~ConfigFile();
+ ///\}
+
protected:
+
+ ///\name Basic operations
+ ///\{
+
ConfigFile(const Source &);
+
+ ///\}
};
+ /**
+ * A line-based configuration file.
+ *
+ * Line continuations, where a line ends in a backslash, are supported. Comment lines
+ * start with a hash character. Leading and trailing whitespace on a line is automatically
+ * stripped.
+ *
+ * \ingroup grplineconfigfile
+ * \nosubgrouping
+ */
class LineConfigFile :
public ConfigFile,
private PrivateImplementationPattern<LineConfigFile>
{
public:
+ ///\name Basic operations
+ ///\{
+
LineConfigFile(const Source &);
~LineConfigFile();
+ ///\}
+
+ ///\name Iterate over our lines
+ ///\{
+
typedef libwrapiter::ForwardIterator<LineConfigFile, const std::string> Iterator;
- Iterator begin() const;
- Iterator end() const;
+ Iterator begin() const PALUDIS_ATTRIBUTE((warn_unused_result));
+ Iterator end() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ ///\}
};
+ /**
+ * A key=value configuration file.
+ *
+ * \ingroup grpkvconfigfile
+ * \nosubgrouping
+ */
class KeyValueConfigFile :
public ConfigFile,
private PrivateImplementationPattern<KeyValueConfigFile>
{
public:
+ /**
+ * A source of default values for a KeyValueConfigFile.
+ *
+ * \ingroup grpkvconfigfile
+ * \see KeyValueConfigFile
+ * \nosubgrouping
+ */
class Defaults :
private PrivateImplementationPattern<Defaults>
{
public:
+ ///\name Basic operations
+ ///\{
+
+ /**
+ * Avoid various C++ syntax oddities by providing a default constructor that
+ * can't be used by anything.
+ *
+ * This is specialised for permissible parameters.
+ */
template <typename T_>
Defaults(T_)
{
T_::WrongTypeForDefaults;
}
+ /**
+ * Defaults, from a function.
+ */
Defaults(std::string (*)(const std::string &, const std::string &));
+ /**
+ * Defaults, from an empty string.
+ */
Defaults();
Defaults(const Defaults &);
@@ -114,33 +229,76 @@ namespace paludis
~Defaults();
+ ///\}
+
+ /**
+ * Get the default value for a particular key.
+ */
std::string get(const std::string &) const;
+ ///\name Iterate over our default keys
+ ///\{
+
typedef libwrapiter::ForwardIterator<Defaults, const std::pair<const std::string, std::string> > Iterator;
Iterator begin() const;
Iterator end() const;
+
+ ///\}
};
+ ///\name Basic operations
+ ///\{
+
KeyValueConfigFile(const Source &, const Defaults & = Defaults(),
bool (* is_incremental) (const std::string &, const KeyValueConfigFile &) = 0);
~KeyValueConfigFile();
+ ///\}
+
+ ///\name Iterate over our keys
+ ///\{
+
typedef libwrapiter::ForwardIterator<KeyValueConfigFile, const std::pair<const std::string, std::string> > Iterator;
Iterator begin() const;
Iterator end() const;
+ ///\}
+
+ /**
+ * Fetch the value for a particular key.
+ */
std::string get(const std::string &) const;
};
+ /**
+ * Use another KeyValueConfigFile for defaults.
+ *
+ * \ingroup grpkvconfigfile
+ */
template<>
KeyValueConfigFile::Defaults::Defaults(std::tr1::shared_ptr<const KeyValueConfigFile>);
+ /**
+ * Use a string pair collection for defaults.
+ *
+ * \ingroup grpkvconfigfile
+ */
template<>
KeyValueConfigFile::Defaults::Defaults(std::tr1::shared_ptr<const AssociativeCollection<std::string, std::string> >);
+ /**
+ * Use another KeyValueConfigFile for defaults (non-const).
+ *
+ * \ingroup grpkvconfigfile
+ */
template<>
KeyValueConfigFile::Defaults::Defaults(std::tr1::shared_ptr<KeyValueConfigFile>);
+ /**
+ * Use a string pair collection for defaults (non-const).
+ *
+ * \ingroup grpkvconfigfile
+ */
template<>
KeyValueConfigFile::Defaults::Defaults(std::tr1::shared_ptr<AssociativeCollection<std::string, std::string> >);
}
diff --git a/paludis/dep_list/dep_list.sr b/paludis/dep_list/dep_list.sr
index fdfd8bf..c1ffe82 100644
--- a/paludis/dep_list/dep_list.sr
+++ b/paludis/dep_list/dep_list.sr
@@ -52,6 +52,18 @@ make_class_DepListEntryDestination()
allow_named_args
comparison_operators "all" "destination"
+
+ doxygen_comment << "END"
+ /**
+ * A destination for a DepListEntry. Only the .destination key is of use outside
+ * of DepList.
+ *
+ * \see DepList
+ * \see DepListEntry
+ * \ingroup grpdepresolver
+ * \nosubgrouping
+ */
+END
}
make_class_DepListEntry()
diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh
index 7893055..4c3bd9e 100644
--- a/paludis/dep_spec.hh
+++ b/paludis/dep_spec.hh
@@ -348,14 +348,8 @@ namespace paludis
*/
explicit PackageDepSpec(const std::string &) PALUDIS_ATTRIBUTE((deprecated));
- /**
- * Constructor.
- */
PackageDepSpec(const std::string &, const PackageDepSpecParseMode);
- /**
- * Constructor.
- */
explicit PackageDepSpec(
std::tr1::shared_ptr<QualifiedPackageName> q = std::tr1::shared_ptr<QualifiedPackageName>(),
std::tr1::shared_ptr<CategoryNamePart> c = std::tr1::shared_ptr<CategoryNamePart>(),
@@ -367,9 +361,6 @@ namespace paludis
std::tr1::shared_ptr<UseRequirements> u = std::tr1::shared_ptr<UseRequirements>(),
std::tr1::shared_ptr<const DepTag> t = std::tr1::shared_ptr<const DepTag>());
- /**
- * Copy constructor.
- */
PackageDepSpec(const PackageDepSpec &);
~PackageDepSpec();
@@ -516,9 +507,6 @@ namespace paludis
///\name Basic operations
///\{
- /**
- * Constructor, with blocking spec.
- */
BlockDepSpec(std::tr1::shared_ptr<const PackageDepSpec> spec);
///\}
diff --git a/paludis/environment.hh b/paludis/environment.hh
index 0659f19..764ff49 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -48,35 +48,40 @@ namespace paludis
* Represents the data for an Environment hook call.
*
* \ingroup grpenvironment
+ * \nosubgrouping
*/
class Hook :
private PrivateImplementationPattern<Hook>
{
public:
- /// Constructor.
+ ///\name Basic operations
+ ///\{
+
Hook(const std::string & name);
- /// Copy constructor.
Hook(const Hook &);
- /// Destructor.
~Hook();
+ ///\}
+
/// Add data to the hook.
Hook operator() (const std::string & key, const std::string & value) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- /// Iterate over extra environment data.
+ ///\name Iterate over environment data
+ ///\{
+
typedef libwrapiter::ForwardIterator<Hook, const std::pair<const std::string, std::string> > Iterator;
- /// Start of extra environment data.
Iterator begin() const
PALUDIS_ATTRIBUTE((warn_unused_result));
- /// End of extra environment data.
Iterator end() const
PALUDIS_ATTRIBUTE((warn_unused_result));
+ ///\}
+
/// Our name.
std::string name() const
PALUDIS_ATTRIBUTE((warn_unused_result));
@@ -87,7 +92,17 @@ namespace paludis
* database and provides various methods for querying package visibility
* and options.
*
+ * Contains a PackageDatabase, which in turn contains a number of Repository
+ * instances.
+ *
+ * EnvironmentMaker is often used to create the appropriate Environment
+ * subclass for an application.
+ *
* \ingroup grpenvironment
+ * \see PackageDatabase
+ * \see Repository
+ * \see EnvironmentMaker
+ * \nosubgrouping
*/
class Environment :
private InstantiationPolicy<Environment, instantiation_method::NonCopyableTag>
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 817cda8..49aedcb 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -75,8 +75,6 @@ namespace paludis
* A set of destinations.
*
* \ingroup grpdepresolver
- * \ingroup grpenvironment
- * \ingroup grprepository
*/
typedef SortedCollection<std::tr1::shared_ptr<Repository> > DestinationsCollection;
diff --git a/paludis/repository.sr b/paludis/repository.sr
index 11e42a6..02aa7f9 100644
--- a/paludis/repository.sr
+++ b/paludis/repository.sr
@@ -15,6 +15,7 @@ make_class_InstallOptions()
*
* \see Repository
* \ingroup grprepository
+ * \nosubgrouping
*/
END
}
@@ -29,6 +30,7 @@ make_class_UninstallOptions()
*
* \see Repository
* \ingroup grprepository
+ * \nosubgrouping
*/
END
}
@@ -75,9 +77,17 @@ make_class_RepositoryPortageInterfaceProfilesDescLine()
key status std::string
key profile "std::tr1::shared_ptr<PortageRepositoryProfile>"
allow_named_args
-}
-
+ doxygen_comment << "END"
+ /**
+ * A profiles.desc line in a Repository implementing RepositoryPortageInterface.
+ *
+ * \see Repository
+ * \see RepositoryPortageInterface
+ * \nosubgrouping
+ */
+END
+}
make_class_RepositoryProvidesEntry()
{
@@ -87,6 +97,16 @@ make_class_RepositoryProvidesEntry()
allow_named_args
comparison_operators all all
+
+ doxygen_comment << "END"
+ /**
+ * A provides entry in a Repository implementing RepositoryProvidesInterface.
+ *
+ * \see Repository
+ * \see RepositoryProvidesInterface
+ * \nosubgrouping
+ */
+END
}
make_class_RepositoryVirtualsEntry()
@@ -96,6 +116,16 @@ make_class_RepositoryVirtualsEntry()
allow_named_args
comparison_operators all virtual_name
+
+ doxygen_comment << "END"
+ /**
+ * A virtuals entry in a Repository implementing RepositoryVirtualsInterface.
+ *
+ * \see Repository
+ * \see RepositoryVirtualsInterface
+ * \nosubgrouping
+ */
+END
}
make_class_MergeOptions()
diff --git a/paludis/util/exception.hh b/paludis/util/exception.hh
index 4671c34..ebd4108 100644
--- a/paludis/util/exception.hh
+++ b/paludis/util/exception.hh
@@ -207,7 +207,6 @@ namespace paludis
* A ConfigurationError is thrown when an invalid configuration occurs.
*
* \ingroup grpexceptions
- * \ingroup grpconfigfile
* \nosubgrouping
*/
class PALUDIS_VISIBLE ConfigurationError :
diff --git a/paludis/util/files.m4 b/paludis/util/files.m4
index bcdf510..4ec2330 100644
--- a/paludis/util/files.m4
+++ b/paludis/util/files.m4
@@ -31,7 +31,7 @@ add(`private_implementation_pattern', `hh')
add(`pstream', `hh', `cc', `test')
add(`random', `hh', `cc', `test')
add(`save', `hh', `test')
-add(`sr', `hh')
+add(`sr', `hh', `cc')
add(`stringify', `hh', `test')
add(`strip', `hh', `cc', `test')
add(`system', `hh', `cc', `test', `testscript')
diff --git a/paludis/util/iterator.hh b/paludis/util/iterator.hh
index db70c5b..1902e12 100644
--- a/paludis/util/iterator.hh
+++ b/paludis/util/iterator.hh
@@ -77,6 +77,11 @@ namespace paludis
typedef T_ Type;
};
+ /**
+ * Like std::tr1::remove_pointer, for std::tr1::shared_ptr.
+ *
+ * \ingroup grpiterators
+ */
template <typename T_>
struct RemoveSharedPointer<const std::tr1::shared_ptr<T_> >
{
diff --git a/paludis/util/sr.cc b/paludis/util/sr.cc
new file mode 100644
index 0000000..4f6801b
--- /dev/null
+++ b/paludis/util/sr.cc
@@ -0,0 +1,25 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "sr.hh"
+
+using namespace paludis;
+
+const Empty Empty::instance = Empty();
+
diff --git a/paludis/util/sr.hh b/paludis/util/sr.hh
index 3213d11..6f48d72 100644
--- a/paludis/util/sr.hh
+++ b/paludis/util/sr.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
@@ -29,6 +29,7 @@ namespace paludis
*/
struct Empty
{
+ static const Empty instance;
};
template <bool value_, typename IfTrue_, typename IfFalse_>
diff --git a/paludis/version_metadata.cc b/paludis/version_metadata.cc
index b483ba3..f17b10f 100644
--- a/paludis/version_metadata.cc
+++ b/paludis/version_metadata.cc
@@ -81,7 +81,7 @@ VersionMetadata::~VersionMetadata()
{
}
-VersionMetadata::VersionMetadata(const VersionMetadataBase::Params<> & base, const VersionMetadataCapabilities & caps) :
+VersionMetadata::VersionMetadata(const VersionMetadataBase::NamedArguments<> & base, const VersionMetadataCapabilities & caps) :
VersionMetadataBase(base),
VersionMetadataCapabilities(caps)
{
diff --git a/paludis/version_metadata.hh b/paludis/version_metadata.hh
index 2a5193f..b388847 100644
--- a/paludis/version_metadata.hh
+++ b/paludis/version_metadata.hh
@@ -89,7 +89,7 @@ namespace paludis
PackageDepSpecParseMode eapi_as_package_dep_spec_parse_mode() const;
protected:
- VersionMetadata(const VersionMetadataBase::Params<> &, const VersionMetadataCapabilities &);
+ VersionMetadata(const VersionMetadataBase::NamedArguments<> &, const VersionMetadataCapabilities &);
};
}
diff --git a/paludis/version_requirements.sr b/paludis/version_requirements.sr
index 46644ca..a905efd 100644
--- a/paludis/version_requirements.sr
+++ b/paludis/version_requirements.sr
@@ -8,6 +8,19 @@ make_class_VersionRequirement()
allow_named_args
comparison_operators "equality" "all"
+
+ doxygen_comment << "END"
+ /**
+ * A requirement for a version, consisting of a VersionOperator and an associated
+ * VersionSpec.
+ *
+ * \ingroup grpversions
+ * \see VersionSpec
+ * \see VersionOperator
+ * \see VersionRequirements
+ * \nosubgrouping
+ */
+END
}