aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 23:30:05 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-22 23:30:05 +0000
commitc2f0f1e818ba3e810ea360aa6074b76061741d5e (patch)
treebabe4b89a4ee6186448d2e64b3e4dbc304d4ae15
parentd52fbd642f04e6c89d601891f9195367ce0723a6 (diff)
downloadpaludis-c2f0f1e818ba3e810ea360aa6074b76061741d5e.tar.gz
paludis-c2f0f1e818ba3e810ea360aa6074b76061741d5e.tar.xz
Doxygenation
-rw-r--r--paludis/args/args_visitor.hh3
-rw-r--r--paludis/attributes.hh16
-rw-r--r--paludis/container_entry_TEST.cc5
-rw-r--r--paludis/create_insert_iterator.hh1
-rw-r--r--paludis/default_config.hh39
-rw-r--r--paludis/default_environment.hh8
-rw-r--r--paludis/dep_atom_dumper.hh3
-rw-r--r--paludis/dep_atom_visitor.hh3
-rw-r--r--paludis/dep_list.hh6
-rw-r--r--paludis/filter_insert_iterator_TEST.cc5
-rw-r--r--paludis/getenv.hh13
-rw-r--r--paludis/iterator_utilities.hh6
-rw-r--r--paludis/match_package.hh39
-rw-r--r--paludis/transform_insert_iterator_TEST.cc5
-rw-r--r--paludis/virtual_constructor_TEST.cc5
-rw-r--r--test/test_framework.cc6
16 files changed, 141 insertions, 22 deletions
diff --git a/paludis/args/args_visitor.hh b/paludis/args/args_visitor.hh
index 22f1e15..bd22f5a 100644
--- a/paludis/args/args_visitor.hh
+++ b/paludis/args/args_visitor.hh
@@ -41,6 +41,9 @@ namespace paludis
class IntegerArg;
class EnumArg;
+ /**
+ * Visitor types for visitors that can visit Args.
+ */
typedef VisitorTypes<ArgsOption *, StringArg *, AliasArg *, SwitchArg *,
IntegerArg *, EnumArg *> ArgsVisitorTypes;
diff --git a/paludis/attributes.hh b/paludis/attributes.hh
index 4027bb9..c3b8178 100644
--- a/paludis/attributes.hh
+++ b/paludis/attributes.hh
@@ -34,22 +34,20 @@
* weak).
*/
-#ifdef __GNUC__
+#if (defined(__GNUC__) || defined(DOXYGEN))
# if ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define PALUDIS_ATTRIBUTE(x) __attribute__(x)
# define PALUDIS_CAN_USE_ATTRIBUTE 1
# else
# define PALUDIS_ATTRIBUTE(x)
# endif
+#elif (defined(__ICC))
+# define PALUDIS_ATTRIBUTE(x) __attribute__(x)
+# define PALUDIS_CAN_USE_ATTRIBUTE 1
+# define nothrow
+# define deprecated
#else
-# ifdef __ICC
-# define PALUDIS_ATTRIBUTE(x) __attribute__(x)
-# define PALUDIS_CAN_USE_ATTRIBUTE 1
-# define nothrow
-# define deprecated
-# else
-# define PALUDIS_ATTRIBUTE(x)
-# endif
+# define PALUDIS_ATTRIBUTE(x)
#endif
#endif
diff --git a/paludis/container_entry_TEST.cc b/paludis/container_entry_TEST.cc
index 91a74db..cfaff44 100644
--- a/paludis/container_entry_TEST.cc
+++ b/paludis/container_entry_TEST.cc
@@ -27,6 +27,11 @@ using namespace paludis;
namespace test_cases
{
+ /**
+ * \test Test ContainerEntry on a list.
+ *
+ * \ingroup Test
+ */
struct ContainerEntryListTest : TestCase
{
ContainerEntryListTest() : TestCase("list") { }
diff --git a/paludis/create_insert_iterator.hh b/paludis/create_insert_iterator.hh
index c2240d7..562fcf6 100644
--- a/paludis/create_insert_iterator.hh
+++ b/paludis/create_insert_iterator.hh
@@ -46,6 +46,7 @@ namespace paludis
*/
struct container_type
{
+ /// Our faked item type.
typedef Type_ value_type;
};
diff --git a/paludis/default_config.hh b/paludis/default_config.hh
index 895a1ee..417cb07 100644
--- a/paludis/default_config.hh
+++ b/paludis/default_config.hh
@@ -45,17 +45,26 @@ namespace paludis
class DefaultConfigError : public ConfigurationError
{
public:
+ /**
+ * Constructor.
+ */
DefaultConfigError(const std::string & msg) throw ();
};
+ /**
+ * Keys for RepositoryConfigEntry.
+ */
enum RepositoryConfigEntryKeys
{
- rce_location,
- rce_profile,
- rce_format,
- rce_importance
+ rce_location, ///< Our location, for example on disk
+ rce_profile, ///< Our profile's location
+ rce_format, ///< Our format, for example 'portage'
+ rce_importance ///< Our importance, higher being more important
};
+ /**
+ * Tag for RepositoryConfigEntry.
+ */
struct RepositoryConfigEntryTag :
SmartRecordTag<comparison_mode::FullComparisonTag,
comparison_method::SmartRecordCompareByKeyTag<rce_importance> >,
@@ -67,13 +76,24 @@ namespace paludis
{
};
+ /**
+ * Holds an entry in a DefaultConfig's repository configuration data.
+ */
+ typedef MakeSmartRecord<RepositoryConfigEntryTag>::Type RepositoryConfigEntry;
+
+ /**
+ * Keys for UseConfigEntry.
+ */
enum UseConfigEntryKeys
{
- uce_dep_atom,
- uce_flag_name,
- uce_flag_state
+ uce_dep_atom, ///< A dependency atom
+ uce_flag_name, ///< The use flag name
+ uce_flag_state ///< The use flag state
};
+ /**
+ * Tag for UseConfigEntry.
+ */
struct UseConfigEntryTag :
SmartRecordTag<comparison_mode::NoComparisonTag, void>,
SmartRecordKeys<UseConfigEntryKeys, 3>,
@@ -83,8 +103,9 @@ namespace paludis
{
};
- typedef MakeSmartRecord<RepositoryConfigEntryTag>::Type RepositoryConfigEntry;
-
+ /**
+ * An entry in a DefaultConfig's use configuration data.
+ */
typedef MakeSmartRecord<UseConfigEntryTag>::Type UseConfigEntry;
/**
diff --git a/paludis/default_environment.hh b/paludis/default_environment.hh
index d5eaca1..cf87a26 100644
--- a/paludis/default_environment.hh
+++ b/paludis/default_environment.hh
@@ -49,13 +49,13 @@ namespace paludis
~DefaultEnvironment();
protected:
- virtual bool query_use(const UseFlagName &, const PackageDatabaseEntry &) const;
+ bool query_use(const UseFlagName &, const PackageDatabaseEntry &) const;
- virtual bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
+ bool accept_keyword(const KeywordName &, const PackageDatabaseEntry * const) const;
- virtual bool query_user_masks(const PackageDatabaseEntry &) const;
+ bool query_user_masks(const PackageDatabaseEntry &) const;
- virtual bool query_user_unmasks(const PackageDatabaseEntry &) const;
+ bool query_user_unmasks(const PackageDatabaseEntry &) const;
};
}
#endif
diff --git a/paludis/dep_atom_dumper.hh b/paludis/dep_atom_dumper.hh
index fbf20d3..1b49a10 100644
--- a/paludis/dep_atom_dumper.hh
+++ b/paludis/dep_atom_dumper.hh
@@ -46,6 +46,8 @@ namespace paludis
*/
DepAtomDumper(std::ostream * const o);
+ /// \name Visit functions
+ ///{
void visit(const AllDepAtom * const);
void visit(const AnyDepAtom * const);
@@ -55,6 +57,7 @@ namespace paludis
void visit(const PackageDepAtom * const);
void visit(const BlockDepAtom * const);
+ ///}
};
}
diff --git a/paludis/dep_atom_visitor.hh b/paludis/dep_atom_visitor.hh
index ff12c45..ecd8bc3 100644
--- a/paludis/dep_atom_visitor.hh
+++ b/paludis/dep_atom_visitor.hh
@@ -30,6 +30,9 @@ namespace paludis
class UseDepAtom;
class BlockDepAtom;
+ /**
+ * Visitor types for a visitor that can visit a DepAtom heirarchy.
+ */
typedef VisitorTypes<PackageDepAtom *, AllDepAtom *, AnyDepAtom *,
UseDepAtom *, BlockDepAtom *> DepAtomVisitorTypes;
}
diff --git a/paludis/dep_list.hh b/paludis/dep_list.hh
index 186db14..bf464a5 100644
--- a/paludis/dep_list.hh
+++ b/paludis/dep_list.hh
@@ -123,6 +123,9 @@ namespace paludis
class BlockError : public DepListError
{
public:
+ /**
+ * Constructor.
+ */
BlockError(const std::string & msg) throw ();
};
@@ -177,11 +180,14 @@ namespace paludis
void _add_in_role(DepAtom::ConstPointer, const std::string & role);
protected:
+ ///\name Visit functions
+ ///{
void visit(const PackageDepAtom * const);
void visit(const UseDepAtom * const);
void visit(const AnyDepAtom * const);
void visit(const BlockDepAtom * const);
void visit(const AllDepAtom * const);
+ ///}
public:
/**
diff --git a/paludis/filter_insert_iterator_TEST.cc b/paludis/filter_insert_iterator_TEST.cc
index c1bacc7..19c9f7f 100644
--- a/paludis/filter_insert_iterator_TEST.cc
+++ b/paludis/filter_insert_iterator_TEST.cc
@@ -52,6 +52,11 @@ int is_even(const int & v)
namespace test_cases
{
+ /**
+ * \test Test FilterInsertIterator.
+ *
+ * \ingroup Test
+ */
struct FilterInsertIteratorTest : TestCase
{
FilterInsertIteratorTest() : TestCase("filter insert iterator") { }
diff --git a/paludis/getenv.hh b/paludis/getenv.hh
index b68d54b..c2c27c0 100644
--- a/paludis/getenv.hh
+++ b/paludis/getenv.hh
@@ -26,14 +26,27 @@
namespace paludis
{
+ /**
+ * Thrown if getenv_or_error fails.
+ *
+ * \ingroup Exception
+ */
class GetenvError : public Exception
{
public:
GetenvError(const std::string & key) throw ();
};
+ /**
+ * Fetch the value of environment variable key, or def if the variable is
+ * not defined.
+ */
std::string getenv_with_default(const std::string & key, const std::string & def);
+ /**
+ * Fetch the value of environment variable key, or throw a GetenvError if
+ * the variable is not defined.
+ */
std::string getenv_or_error(const std::string & key);
}
diff --git a/paludis/iterator_utilities.hh b/paludis/iterator_utilities.hh
index a8caae0..fbff173 100644
--- a/paludis/iterator_utilities.hh
+++ b/paludis/iterator_utilities.hh
@@ -23,6 +23,9 @@
namespace paludis
{
+ /**
+ * Return a new iterator pointing to the item after i.
+ */
template <typename T_>
T_ next(const T_ & i)
{
@@ -30,6 +33,9 @@ namespace paludis
return ++result;
}
+ /**
+ * Return a new iterator pointing to the item before i.
+ */
template <typename T_>
T_ previous(const T_ & i)
{
diff --git a/paludis/match_package.hh b/paludis/match_package.hh
index c4771ca..89befd7 100644
--- a/paludis/match_package.hh
+++ b/paludis/match_package.hh
@@ -17,63 +17,99 @@
namespace paludis
{
+ /**
+ * For internal use by match_package.
+ */
namespace match_package_internals
{
+ /**
+ * Do the match on a PackageDatabaseEntry.
+ */
bool do_match(
const PackageDatabase * const db,
const PackageDepAtom * const atom,
const PackageDatabaseEntry * const entry)
PALUDIS_ATTRIBUTE((nonnull(1, 2, 3)));
+ /**
+ * Do the match on a DepListEntry.
+ */
bool do_match(
const PackageDatabase * const db,
const PackageDepAtom * const atom,
const DepListEntry * const entry)
PALUDIS_ATTRIBUTE((nonnull(2, 3)));
+ /**
+ * Normalise type.
+ */
inline const PackageDatabase * sanitise_db(const PackageDatabase * db)
{
return db;
}
+ /**
+ * Normalise type.
+ */
inline const PackageDatabase * sanitise_db(const PackageDatabase & db)
{
return &db;
}
+ /**
+ * Normalise type.
+ */
template <typename P1_, typename P2_>
inline const PackageDatabase * sanitise_db(const CountedPtr<const PackageDatabase, P1_, P2_> db)
{
return db.raw_pointer();
}
+ /**
+ * Normalise type.
+ */
inline const PackageDatabase * sanitise_db(const PackageDatabase::ConstPointer db)
{
return db.raw_pointer();
}
+ /**
+ * Normalise type.
+ */
inline const PackageDepAtom * sanitise_atom(const PackageDepAtom * atom)
{
return atom;
}
+ /**
+ * Normalise type.
+ */
inline const PackageDepAtom * sanitise_atom(const PackageDepAtom & atom)
{
return &atom;
}
+ /**
+ * Normalise type.
+ */
template <typename P1_, typename P2_>
inline const PackageDepAtom * sanitise_atom(const CountedPtr<const PackageDepAtom, P1_, P2_> atom)
{
return atom.raw_pointer();
}
+ /**
+ * Normalise type.
+ */
template <typename T_>
inline const T_ * sanitise_target(const T_ * e)
{
return e;
}
+ /**
+ * Normalise type.
+ */
template <typename T_>
inline const T_ * sanitise_target(const T_ & e)
{
@@ -81,6 +117,9 @@ namespace paludis
}
}
+ /**
+ * Does the specified atom match the specified target?
+ */
template <typename DB_, typename Atom_, typename Target_>
bool match_package(
const DB_ & db,
diff --git a/paludis/transform_insert_iterator_TEST.cc b/paludis/transform_insert_iterator_TEST.cc
index c07aa55..4816f22 100644
--- a/paludis/transform_insert_iterator_TEST.cc
+++ b/paludis/transform_insert_iterator_TEST.cc
@@ -51,6 +51,11 @@ int f(const int & v)
namespace test_cases
{
+ /**
+ * \test Test TransformInsertIterator.
+ *
+ * \ingroup Test
+ */
struct TransformInsertIteratorTest : TestCase
{
TransformInsertIteratorTest() : TestCase("transform insert iterator") { }
diff --git a/paludis/virtual_constructor_TEST.cc b/paludis/virtual_constructor_TEST.cc
index f034581..86c116b 100644
--- a/paludis/virtual_constructor_TEST.cc
+++ b/paludis/virtual_constructor_TEST.cc
@@ -112,6 +112,11 @@ CookieMaker::RegisterMaker register_crunchy_ginger("crunchy ginger", &GingerCook
namespace test_cases
{
+ /**
+ * \test Test VirtualConstructor.
+ *
+ * \ingroup Test
+ */
struct VirtualConstructorTest : TestCase
{
VirtualConstructorTest() : TestCase("virtual constructor") { }
diff --git a/test/test_framework.cc b/test/test_framework.cc
index 8b60de4..f4a9ebd 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -32,6 +32,12 @@
using namespace test;
+/**
+ * Default implementation of exception_to_debug_string, that can be overridden
+ * by other libraries.
+ *
+ * \ingroup Test
+ */
std::string exception_to_debug_string(const std::exception &) PALUDIS_ATTRIBUTE((weak));
std::string exception_to_debug_string(const std::exception & e)