From b71473f24bfa72cc4fd5bcd10374d5c42ef13911 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Wed, 15 Aug 2012 14:37:01 +0000
Subject: [PATCH] propertysystem and parameters: improved documentation
 appearance by adding \code, \endcode commands

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8879 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/common/parameters.hh     | 12 ++++++++++--
 dumux/common/propertysystem.hh | 14 ++++++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh
index d7e44f49ad..3dd018f005 100644
--- a/dumux/common/parameters.hh
+++ b/dumux/common/parameters.hh
@@ -47,9 +47,11 @@
  *
  * Example:
  *
- * // -> retrieves scalar value UpwindWeight, default
- * // is taken from the property UpwindWeight
+ * \code 
+ * // -> retrieves scalar value UpwindWeight, default 
+ * // is taken from the property UpwindWeight 
  * GET_PARAM(TypeTag, Scalar, UpwindWeight);
+ * \endcode
  */
 #define GET_PARAM(TypeTag, ParamType, ParamName)                        \
     Dumux::Parameters::get<TypeTag,                                     \
@@ -66,9 +68,11 @@
  *
  * Example:
  *
+ * \code 
  * // -> retrieves Boolean value Newton.WriteConvergence, default
  * // is taken from the property NewtonWriteConvergence
  * GET_PARAM_FROM_GROUP(TypeTag, bool, Newton, WriteConvergence);
+ * \endcode
  */
 #define GET_PARAM_FROM_GROUP(TypeTag, ParamType, GroupName, ParamName)  \
     Dumux::Parameters::get<TypeTag,                                     \
@@ -82,8 +86,10 @@
  *
  * Example:
  *
+ * \code 
  * // -> retrieves global integer value NumberOfCellsX
  * GET_RUNTIME_PARAM(TypeTag, int, NumberOfCellsX);
+ * \endcode
  */
 #define GET_RUNTIME_PARAM(TypeTag, ParamType, ParamName) \
         Dumux::Parameters::getRuntime<TypeTag, ParamType>(#ParamName)
@@ -97,9 +103,11 @@
  *
  * Example:
  *
+ * \code 
  * // -> retrieves global integer value NumberOfCellsX which is
  * // located int the parameter group "Geometry"
  * GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Geometry, NumberOfCellsX);
+ * \endcode
  */
 #define GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, ParamType, GroupName, ParamName) \
     Dumux::Parameters::getRuntime<TypeTag, ParamType>(#GroupName, #ParamName)
diff --git a/dumux/common/propertysystem.hh b/dumux/common/propertysystem.hh
index cdbf6885bb..ab26c0e710 100644
--- a/dumux/common/propertysystem.hh
+++ b/dumux/common/propertysystem.hh
@@ -155,6 +155,7 @@ namespace Properties
  * A type tag can inherit the properties defined on up to five parent
  * type tags. Examples:
  *
+ * \code
  * // The type tag doesn't inherit any properties from other type tags
  * NEW_TYPE_TAG(FooTypeTag);
  *
@@ -165,6 +166,7 @@ namespace Properties
  * // those of BarTypeTag. Properties defined on BarTypeTag have
  * // preceedence over those defined for FooTypeTag:
  * NEW_TYPE_TAG(FooBarTypeTag, INHERITS_FROM(FooTypeTag, BarTypeTag));
+ * \endcode
  */
 #define NEW_TYPE_TAG(...)                                               \
     namespace TTag {                                                    \
@@ -191,8 +193,10 @@ namespace Properties
  *
  * Examples:
  *
+ * \code
  * NEW_PROP_TAG(blubbPropTag);
  * NEW_PROP_TAG(blabbPropTag);
+ * \endcode
  */
 #define NEW_PROP_TAG(PTagName)                             \
     namespace PTag {                                       \
@@ -207,11 +211,13 @@ namespace Properties
  *
  * Example:
  *
+ * \code
  * // set a default for the blabbPropTag property tag
  * SET_PROP_DEFAULT(blabbPropTag)
  * {
  *    static const int value = 3;
  * };
+ * \endcode
  */
 #define SET_PROP_DEFAULT(PropTagName) \
     template <class TypeTag>                                            \
@@ -249,6 +255,7 @@ namespace Properties
  *
  * Example:
  *
+ * \code
  * SET_PROP(FooTypeTag, blubbPropTag)
  * {
  *    static int value = 10;
@@ -264,6 +271,7 @@ namespace Properties
  *
  *    static int calculateInternal_(int arg)
  *    { return arg * blabb::value; };
+ * \endcode
  * };
  */
 #define SET_PROP(EffTypeTagName, PropTagName)                   \
@@ -288,8 +296,10 @@ namespace Properties
  *
  * Example:
  *
+ * \code
  * // make the blabbPropTag property undefined for the BarTypeTag.
  * UNSET_PROP(BarTypeTag, blabbPropTag);
+ * \endcode
  */
 #define UNSET_PROP(EffTypeTagName, PropTagName)                 \
     template <>                                                 \
@@ -438,10 +448,12 @@ namespace Properties
  *
  * Example:
  *
+ * \code
  * int main()
  * {
  *    std::cout << PROP_DIAGNOSTIC(FooBarTypeTag, blabbPropTag) << "\n";
  * };
+ * \endcode
  */
 #define PROP_DIAGNOSTIC(TypeTag, PropTagName) \
     ::Dumux::Properties::getDiagnostic<TypeTag>(#PropTagName)
@@ -456,10 +468,12 @@ namespace Properties
  *
  * Example:
  *
+ * \code
  * int main()
  * {
  *    std::cout << PROP_DIAGNOSTIC(FooBarTypeTag, blabbPropTag) << "\n";
  * };
+ * \endcode
  */
 #define PROP_DIAGNOSTIC(TypeTag, PropTagName) "Property introspection disabled by NO_PROPERTY_INTROSPECTION"
 #endif
-- 
GitLab