From 23c9cd942b13257bbf109cfdd0aa3d277890a364 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@dune-project.org>
Date: Thu, 9 Jun 2005 07:35:42 +0000
Subject: [PATCH] namespaces and some doxygen

[[Imported from SVN: r2116]]
---
 common/misc.hh | 45 ++++++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/common/misc.hh b/common/misc.hh
index b29d1840f..34d8daac8 100644
--- a/common/misc.hh
+++ b/common/misc.hh
@@ -1,45 +1,48 @@
 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 // vi: set et ts=4 sw=2 sts=2:
-#ifndef __MISC_HH__
-#define __MISC_HH__
+/** \file
+    \brief Miscellaneous helper stuff
+ */
+
+#ifndef MISC_HH
+#define MISC_HH
 
 #include <iostream>
 #include <sstream>
 
-//! Check condition at compilation time
-template <bool flag> class CompileTimeChecker;
+namespace Dune {
+
+  //! Check condition at compilation time
+  template <bool flag> class CompileTimeChecker;
 
-//! it exists only an implementation for true so the compiler throws an
-//! error if the condition is false
-template <> class CompileTimeChecker<true> { };
+  //! it exists only an implementation for true so the compiler throws an
+  //! error if the condition is false
+  template <> class CompileTimeChecker<true> { };
 
 
-//! Map an integer value to a type
-//! This comes in handy if one tries to emulate member function specialization.
-//! The idea how to do it is presented in "Modern C++ Design" by Alexandrescu.
-template <int N>
-struct Int2Type {
-  enum { value = N };
-};
+  /** \brief Map an integer value to a type
+
+     This comes in handy if one tries to emulate member function specialization.
+     The idea how to do it is presented in "Modern C++ Design" by Alexandrescu.
+   */
+  template <int N>
+  struct Int2Type {
+    enum { value = N };
+  };
 
-namespace Dune {
   /** @addtogroup Common
 
           @{
    */
 
+  /** \brief Compute the square of T */
   template<class T>
   T SQR (T t)
   {
     return t*t;
   }
 
-  //********************************************************************
-  //
-  // generate filenames with timestep number in it
-  //
-  //********************************************************************
-
+  /** \brief Generate filenames with timestep number in it */
   inline std::string genFilename(const std::string& path,
                                  const std::string& fn,
                                  int ntime,
-- 
GitLab