aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 02:20:05 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-05 02:20:05 +0000
commitb089f09a601c49a1c65275178493cf2dc7fcd562 (patch)
tree7fd8e7f9f04a3491af06bf9e25c3dfc4038527d3
parent2b38b4fac04da0ab1962fa9ee0d9e553548b43d0 (diff)
downloadpaludis-b089f09a601c49a1c65275178493cf2dc7fcd562.tar.gz
paludis-b089f09a601c49a1c65275178493cf2dc7fcd562.tar.xz
Random doxygen updates
-rw-r--r--paludis/dep_list_TEST.cc2
-rw-r--r--paludis/dep_parser.hh3
-rw-r--r--paludis/hashed_containers.hh.in34
-rw-r--r--paludis/hashed_containers_TEST.cc5
-rw-r--r--paludis/log.cc6
-rw-r--r--paludis/log.hh15
-rw-r--r--paludis/package_dep_atom_TEST.cc5
-rw-r--r--paludis/portage_repository.cc2
-rw-r--r--paludis/portage_repository.hh3
-rw-r--r--paludis/qualified_package_name.hh12
-rw-r--r--paludis/repository.hh3
-rw-r--r--paludis/transform_insert_iterator.hh1
-rw-r--r--paludis/virtual_constructor.hh3
-rw-r--r--src/check_deps_exist.cc2
-rw-r--r--src/paludis.cc2
-rw-r--r--test/test_framework.cc3
-rw-r--r--test/test_framework.hh3
17 files changed, 102 insertions, 2 deletions
diff --git a/paludis/dep_list_TEST.cc b/paludis/dep_list_TEST.cc
index cb738e2..15a466b 100644
--- a/paludis/dep_list_TEST.cc
+++ b/paludis/dep_list_TEST.cc
@@ -35,12 +35,14 @@ namespace test_cases
*/
class DepListTestCaseBase : TestCase
{
+#ifndef DOXYGEN
protected:
TestEnvironment env;
FakeRepository::Pointer repo;
std::deque<std::string> expected;
std::string merge_target;
bool done_populate;
+#endif
/**
* Constructor.
diff --git a/paludis/dep_parser.hh b/paludis/dep_parser.hh
index b283fcc..17c728d 100644
--- a/paludis/dep_parser.hh
+++ b/paludis/dep_parser.hh
@@ -90,6 +90,9 @@ namespace paludis
private InstantiationPolicy<DepParser, instantiation_method::NonInstantiableTag>
{
protected:
+ /**
+ * Default options for parse.
+ */
static DepParserOptions default_options();
public:
diff --git a/paludis/hashed_containers.hh.in b/paludis/hashed_containers.hh.in
index ef67f57..587d14b 100644
--- a/paludis/hashed_containers.hh.in
+++ b/paludis/hashed_containers.hh.in
@@ -49,26 +49,42 @@ namespace paludis
template <typename T_>
struct CRCHash;
+ /**
+ * Make a hashed map of some kind from Key_ to Value_.
+ */
template <typename Key_, typename Value_>
struct MakeHashedMap
{
#if PALUDIS_HAVE_TR1_HASHES
+ /// Our map type.
typedef std::tr1::unordered_map<Key_, Value_, CRCHash<Key_> > Type;
+
#elif PALUDIS_HAVE_EXT_HASHES
+ /// Our map type.
typedef __gnu_cxx::hash_map<Key_, Value_, CRCHash<Key_> > Type;
+
#else
+ /// Our map type.
typedef std::map<Key_, Value_> Type;
#endif
};
+ /**
+ * Make a hashed set of some kind of Key_.
+ */
template <typename Key_>
struct MakeHashedSet
{
#if PALUDIS_HAVE_TR1_HASHES
+ /// Our set type.
typedef std::tr1::unordered_set<Key_, CRCHash<Key_> > Type;
+
#elif PALUDIS_HAVE_EXT_HASHES
+ /// Our set type.
typedef __gnu_cxx::hash_set<Key_, CRCHash<Key_> > Type;
+
#else
+ /// Our set type.
typedef std::set<Key_> Type;
#endif
};
@@ -76,37 +92,55 @@ namespace paludis
#if PALUDIS_HAVE_TR1_HASHES || PALUDIS_HAVE_EXT_HASHES
namespace
{
+ /**
+ * Base definitions for our CRCHash.
+ */
struct CRCHashBase
{
+ /// Shift value.
static const std::size_t h_shift = std::numeric_limits<std::size_t>::digits - 5;
+
+ /// Mask value.
static const std::size_t h_mask = 0x1f << h_shift;
};
}
+ /**
+ * Hash, for QualifiedPackageName.
+ */
template <>
class CRCHash<QualifiedPackageName> :
public std::unary_function<QualifiedPackageName, std::size_t>,
protected CRCHashBase
{
public:
+ /// Hash function.
std::size_t operator() (const QualifiedPackageName & val) const;
};
+ /**
+ * Hash, for a validated string type.
+ */
template <typename Validated_>
class CRCHash<Validated<std::string, Validated_> > :
public std::unary_function<Validated<std::string, Validated_>, std::size_t>,
protected CRCHashBase
{
public:
+ /// Hash function.
std::size_t operator() (const Validated<std::string, Validated_> & val) const;
};
+ /**
+ * Hash, for a QualifiedPackageName + VersionSpec pair.
+ */
template <>
class CRCHash<std::pair<QualifiedPackageName, VersionSpec> > :
public std::unary_function<std::pair<QualifiedPackageName, VersionSpec>, std::size_t>,
protected CRCHashBase
{
public:
+ /// Hash function.
std::size_t operator() (const std::pair<QualifiedPackageName, VersionSpec> & val) const;
};
diff --git a/paludis/hashed_containers_TEST.cc b/paludis/hashed_containers_TEST.cc
index ce04c9a..f01a387 100644
--- a/paludis/hashed_containers_TEST.cc
+++ b/paludis/hashed_containers_TEST.cc
@@ -26,6 +26,11 @@ using namespace test;
namespace test_cases
{
+ /**
+ * \test Test HashSet.
+ *
+ * \ingroup Test
+ */
struct HashSetTestQPN : TestCase
{
HashSetTestQPN() : TestCase("hash set qpn") { }
diff --git a/paludis/log.cc b/paludis/log.cc
index b48d8b5..37d98f1 100644
--- a/paludis/log.cc
+++ b/paludis/log.cc
@@ -24,11 +24,17 @@ using namespace paludis;
namespace paludis
{
+ /**
+ * Implementation data for Log.
+ */
template<>
struct Implementation<Log> :
InternalCounted<Implementation<Log> >
{
+ /// Current log level
LogLevel log_level;
+
+ /// Current output stream
std::ostream * stream;
};
}
diff --git a/paludis/log.hh b/paludis/log.hh
index b3f2e2d..beff0a5 100644
--- a/paludis/log.hh
+++ b/paludis/log.hh
@@ -42,6 +42,9 @@ namespace paludis
initial_ll = ll_debug ///< Initial value
};
+ /**
+ * Singleton class that handles log messages.
+ */
class Log :
public InstantiationPolicy<Log, instantiation_method::SingletonAsNeededTag>,
private PrivateImplementationPattern<Log>
@@ -52,12 +55,24 @@ namespace paludis
Log();
public:
+ /**
+ * Destructor, to be called only by our InstantiationPolicy.
+ */
~Log();
+ /**
+ * Only display messages of at least this level.
+ */
void set_log_level(const LogLevel);
+ /**
+ * Log a message at the specified level.
+ */
void message(const LogLevel, const std::string &);
+ /**
+ * Change the log stream.
+ */
void set_log_stream(std::ostream * const);
};
}
diff --git a/paludis/package_dep_atom_TEST.cc b/paludis/package_dep_atom_TEST.cc
index e1e1d6d..b648116 100644
--- a/paludis/package_dep_atom_TEST.cc
+++ b/paludis/package_dep_atom_TEST.cc
@@ -26,6 +26,11 @@ using namespace test;
namespace test_cases
{
+ /**
+ * \test Test PackageDepAtom.
+ *
+ * \ingroup Test
+ */
struct PackageDepAtomTest : TestCase
{
PackageDepAtomTest() : TestCase("package dep atom") { }
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index 1dbb577..3ac748e 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -292,6 +292,7 @@ PortageRepository::do_has_package_named(const CategoryNamePart & c,
}
}
+#ifndef DOXYGEN
struct CategoryFilter :
std::unary_function<bool, QualifiedPackageName>
{
@@ -307,6 +308,7 @@ struct CategoryFilter :
return a.get<qpn_category>() == category;
}
};
+#endif
CategoryNamePartCollection::ConstPointer
PortageRepository::do_category_names() const
diff --git a/paludis/portage_repository.hh b/paludis/portage_repository.hh
index ad9043a..180295d 100644
--- a/paludis/portage_repository.hh
+++ b/paludis/portage_repository.hh
@@ -112,6 +112,9 @@ namespace paludis
class PortageRepositoryConfigurationError : public ConfigurationError
{
public:
+ /**
+ * Constructor.
+ */
PortageRepositoryConfigurationError(const std::string & msg) throw ();
};
diff --git a/paludis/qualified_package_name.hh b/paludis/qualified_package_name.hh
index 9faef6e..e60312e 100644
--- a/paludis/qualified_package_name.hh
+++ b/paludis/qualified_package_name.hh
@@ -62,21 +62,33 @@ namespace paludis
const std::string & s);
public:
+ /**
+ * Constructor.
+ */
QualifiedPackageName(const CategoryNamePart & c, const PackageNamePart & p) :
MakeSmartRecord<QualifiedPackageNameTag>::Type(c, p)
{
}
+ /**
+ * Copy constructor.
+ */
QualifiedPackageName(const QualifiedPackageName & other) :
MakeSmartRecord<QualifiedPackageNameTag>::Type(other)
{
}
+ /**
+ * Constructor, from a raw string.
+ */
explicit QualifiedPackageName(const std::string & s) :
MakeSmartRecord<QualifiedPackageNameTag>::Type(_make_parent(s))
{
}
+ /**
+ * Assignment.
+ */
const QualifiedPackageName & operator= (const QualifiedPackageName & other)
{
MakeSmartRecord<QualifiedPackageNameTag>::Type::operator= (other);
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 62ecec3..6229dcd 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -317,6 +317,9 @@ namespace paludis
class NoSuchRepositoryTypeError : public ConfigurationError
{
public:
+ /**
+ * Constructor.
+ */
NoSuchRepositoryTypeError(const std::string & format) throw ();
};
diff --git a/paludis/transform_insert_iterator.hh b/paludis/transform_insert_iterator.hh
index 5d8dfb4..1e1d16e 100644
--- a/paludis/transform_insert_iterator.hh
+++ b/paludis/transform_insert_iterator.hh
@@ -131,6 +131,7 @@ namespace paludis
struct SelectFirst :
std::unary_function<A_, std::pair<A_, B_> >
{
+ /// Carry out the selection.
A_ operator() (const std::pair<A_, B_> & p) const
{
return p.first;
diff --git a/paludis/virtual_constructor.hh b/paludis/virtual_constructor.hh
index eaf7cb1..8ebb9f9 100644
--- a/paludis/virtual_constructor.hh
+++ b/paludis/virtual_constructor.hh
@@ -113,6 +113,9 @@ namespace paludis
class VirtualConstructorRegisterFailure : public Exception
{
public:
+ /**
+ * Constructor.
+ */
template <typename T_>
VirtualConstructorRegisterFailure(const T_ & k) throw () :
Exception("Virtual constructor registration failed on key '" +
diff --git a/src/check_deps_exist.cc b/src/check_deps_exist.cc
index 6b7ac40..7c987a2 100644
--- a/src/check_deps_exist.cc
+++ b/src/check_deps_exist.cc
@@ -28,6 +28,7 @@ using std::cout;
using std::cerr;
using std::endl;
+#ifndef DOXYGEN
struct CheckDepsExistCommandline :
args::ArgsHandler,
InstantiationPolicy<CheckDepsExistCommandline, instantiation_method::SingletonAsNeededTag>
@@ -130,6 +131,7 @@ struct DoHelp
{
}
};
+#endif
int
main(int argc, char *argv[])
diff --git a/src/paludis.cc b/src/paludis.cc
index 2ed8def..19799b3 100644
--- a/src/paludis.cc
+++ b/src/paludis.cc
@@ -36,6 +36,7 @@ using std::cout;
using std::cerr;
using std::endl;
+#ifndef DOXYGEN
struct DoHelp
{
const std::string message;
@@ -49,6 +50,7 @@ struct DoHelp
struct DoVersion
{
};
+#endif
int
main(int argc, char *argv[])
diff --git a/test/test_framework.cc b/test/test_framework.cc
index 8d249ef..187e06f 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -31,6 +31,7 @@
using namespace test;
+#ifndef DOXYGEN
namespace
{
std::string exception_to_debug_string(const std::exception & e)
@@ -67,8 +68,6 @@ namespace
};
}
-#ifndef DOXYGEN
-
void
test::set_exception_to_debug_string(std::string (*f) (const std::exception &))
{
diff --git a/test/test_framework.hh b/test/test_framework.hh
index c90e805..652f3e9 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -189,6 +189,9 @@ namespace test
static bool run_tests();
};
+ /**
+ * Change the function used to get a string description of an exception.
+ */
void set_exception_to_debug_string(std::string (*) (const std::exception &));
}