File: documentation.hh

package info (click to toggle)
dune-common 2.11.0-1~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,056 kB
  • sloc: cpp: 54,404; python: 4,136; sh: 1,657; makefile: 17
file content (60 lines) | stat: -rw-r--r-- 1,506 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception

#ifndef DUNE_COMMON_DOCUMENTATION_HH
#define DUNE_COMMON_DOCUMENTATION_HH

/** \file
    \brief Documentation related stuff
 */

namespace Dune {

  /**
   * \brief Dummy struct used for documentation purposes
   *
   * This struct can be used for documenting interfaces.  One example would
   * be:
   * \code
   * // Traits class that determines some property for some other type T
   * template<class T>
   * class SomeTraits {
   *   static_assert(Dune::AlwaysFalse<T>::value,
   *                 "Sorry, SomeTraits must be specialized for all types");
   * public:
   *   // The type of some property of T
   *   typedef ImplementationDefined type;
   * };
   * #ifndef DOXYGEN
   * template<>
   * struct SomeTraits<int>
   *   typedef ... type;
   * };
   * // ...
   * #endif // DOXYGEN
   * \endcode
   *
   * \sa implementationDefined
   * \ingroup Common
   */
  struct ImplementationDefined {};

  /**
   * \brief Dummy integral value used for documentation purposes
   *
   * \var Dune::implementationDefined
   * \code
   * #include <dune/common/documentation.hh>
   * \endcode
   *
   * \sa ImplementationDefined
   * \ingroup Common
   */
  enum { implementationDefined };

}


#endif // DUNE_COMMON_DOCUMENTATION_HH