Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Utils / Tags.hh
1 // $Id$
2 //
3 // Copyright (C) 2008
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
23 /** \file
24     \brief Tags public header */
25
26 #ifndef HH_SENF_Utils_Tags_
27 #define HH_SENF_Utils_Tags_ 1
28
29 // Custom includes
30
31 //#include "Tags.mpp"
32 //-/////////////////////////////////////////////////////////////////////////////////////////////////
33
34 /** \defgroup utils_tags Type tags
35
36     Type tags are used to select variants of a member, function, template or constructor. A Type tag
37     always has only a single value which is passed wherever a parameter of that tag's type is
38     needed.
39
40     The argument which expects a type-tag value will always be declared in such a way, that it is
41     optional. Examples of type tag use are:
42
43     \code
44     result = object.find<Foo>();                  // This call may throw
45     result = object.find<Foo>(senf::nothrow);     // This call will not throw
46     \endcode
47
48     Of course, this only works with objects which explicitly declare, that they take an optional
49     senf::NoThrow_t type aprameter.
50  */
51
52 namespace senf {
53
54     /** \brief Type tag selecting non-throwing variant of something
55
56         This tag is used to select the non-throwing variant of a member, function, template or
57         constructor. An argument of this type is always declared in such a way, that it is
58         optional.
59
60         There is only a single value for this type: \ref senf::nothrow which is the value to pass
61         wherever an (optional) senf::NoThrow_t parameter is requested.
62
63         \ingroup utils_tags
64      */
65     enum NoThrow_t { nothrow };
66
67     /** \brief Type tag selecting uninitialized variant of something
68
69         This tag is used to select the unititialized variant of a member, function, template or
70         constructor (mostly a constructor). An argument of this type is always declared in such a
71         way, that it is optional.
72
73         There is only a single value for this type: \ref senf::noinit which is the value to pass
74         wherever an (optional) senf::NoInit_t parameter is requested.
75
76         \ingroup utils_tags
77      */
78     enum NoInit_t { noinit };
79
80 }
81
82 //-/////////////////////////////////////////////////////////////////////////////////////////////////
83 //#include "Tags.cci"
84 //#include "Tags.ct"
85 //#include "Tags.cti"
86 #endif
87
88 \f
89 // Local Variables:
90 // mode: c++
91 // fill-column: 100
92 // comment-column: 40
93 // c-file-style: "senf"
94 // indent-tabs-mode: nil
95 // ispell-local-dictionary: "american"
96 // compile-command: "scons -u test"
97 // End: