aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 00:34:01 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-01-20 00:34:01 +0000
commitf76ef486eac573d6124b205187acd8709f62533f (patch)
treef7491dae0bddde8bfd8e9da94be5ac81cd0afcf0
parent4f59c11d5c5e10b1c70de2961759c49446057fe5 (diff)
downloadpaludis-f76ef486eac573d6124b205187acd8709f62533f.tar.gz
paludis-f76ef486eac573d6124b205187acd8709f62533f.tar.xz
Use the Visitor Doxygen group. Add file and test Doxygen comments.
-rw-r--r--paludis/visitor.cc5
-rw-r--r--paludis/visitor.hh18
-rw-r--r--paludis/visitor_TEST.cc21
3 files changed, 44 insertions, 0 deletions
diff --git a/paludis/visitor.cc b/paludis/visitor.cc
index ddf14e2..792fb51 100644
--- a/paludis/visitor.cc
+++ b/paludis/visitor.cc
@@ -20,3 +20,8 @@
#include "visitor.hh"
+/** \file
+ * Definitions for paludis::Visitor and related classes.
+ *
+ * \ingroup Visitor
+ */
diff --git a/paludis/visitor.hh b/paludis/visitor.hh
index d7bece5..c2ea35b 100644
--- a/paludis/visitor.hh
+++ b/paludis/visitor.hh
@@ -43,6 +43,8 @@ namespace paludis
* Used as a default parameter when no type is provided. The n_
* parameter is used to avoid inheriting the same class more than once
* from a single parent.
+ *
+ * \ingroup Visitor
*/
template <unsigned n_>
struct NoType
@@ -51,12 +53,16 @@ namespace paludis
/**
* Make a pointer to a const.
+ *
+ * \ingroup Visitor
*/
template <typename>
struct MakePointerToConst;
/**
* Make a pointer to a const (specialisation for non-const pointers).
+ *
+ * \ingroup Visitor
*/
template <typename T_>
struct MakePointerToConst<T_ *>
@@ -69,6 +75,8 @@ namespace paludis
/**
* Interface: visit a class of NodePtrType_.
+ *
+ * \ingroup Visitor
*/
template <typename NodePtrType_>
class Visits
@@ -84,6 +92,8 @@ namespace paludis
/**
* Interface: don't visit NoType things.
+ *
+ * \ingroup Visitor
*/
template <unsigned n_>
class Visits<const visitor_internals::NoType<n_> * >
@@ -96,6 +106,8 @@ namespace paludis
/**
* Interface: don't visit NoType things.
+ *
+ * \ingroup Visitor
*/
template <unsigned n_>
class Visits<visitor_internals::NoType<n_> * >
@@ -110,6 +122,8 @@ namespace paludis
/**
* A class that inherits virtually from VisitableInterface can accept a
* visitor that is descended from one of the VisitorType_ subclasses.
+ *
+ * \ingroup Visitor
*/
template <typename VisitorType_>
class VisitableInterface
@@ -137,6 +151,8 @@ namespace paludis
/**
* A class that inherits (non-virtually) from Visitable provides an
* implementation of VisitableInterface.
+ *
+ * \ingroup Visitor
*/
template <typename OurType_, typename VisitorType_>
class Visitable :
@@ -167,6 +183,8 @@ namespace paludis
/**
* Create the base classes for constant and non-constant visitors to the
* specified node types.
+ *
+ * \ingroup Visitor
*/
template <
typename N1_,
diff --git a/paludis/visitor_TEST.cc b/paludis/visitor_TEST.cc
index a5dbbce..1bd2c57 100644
--- a/paludis/visitor_TEST.cc
+++ b/paludis/visitor_TEST.cc
@@ -29,6 +29,15 @@
using namespace paludis;
using namespace test;
+/** \file
+ * Test cases for visitor.hh .
+ *
+ * \ingroup Test
+ * \ingroup Visitor
+ */
+
+#ifndef DOXYGEN
+
class Node;
class FooNode;
class BarNode;
@@ -102,8 +111,15 @@ struct NodeVisitor :
}
};
+#endif
+
namespace test_cases
{
+ /**
+ * \test Test const visitors.
+ *
+ * \ingroup Test
+ */
struct ConstVisitorTest : TestCase
{
ConstVisitorTest() : TestCase("const visitor") { }
@@ -127,6 +143,11 @@ namespace test_cases
}
} test_const_visitor;
+ /**
+ * \test Test non-const visitors.
+ *
+ * \ingroup Test
+ */
struct VisitorTest : TestCase
{
VisitorTest() : TestCase("visitor") { }