Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Utils / StatisticsTargets.hh
1 // $Id$
2 //
3 // Copyright (C) 2009
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 StatisticsTargets public header */
25
26 #ifndef HH_SENF_PPI_Utils_StatisticsTargets_
27 #define HH_SENF_PPI_Utils_StatisticsTargets_ 1
28
29 // Custom includes
30 #include <string>
31 #include <senf/Utils/Logger/Logger.hh>
32
33 //#include "StatisticsTargets.mpp"
34 #include "StatisticsTargets.ih"
35 //-/////////////////////////////////////////////////////////////////////////////////////////////////
36
37 namespace senf {
38
39 #ifdef DOXYGEN
40     /** \brief Logging stream for statistics messages
41         \ingroup senf_statistics
42      */
43     typedef unspecified StatisticsStream;
44 #else
45     SENF_LOG_DEFINE_STREAM(StatisticsStream,
46                            senf::log::MESSAGE, senf::log::MESSAGE, senf::log::MESSAGE);
47 #endif
48
49 #ifdef DOXYGEN
50
51     /** \brief Send statistics to SENF log
52
53         This statistics target will send all statistics values to the SENF log. The template
54         parameters optionally specify the stream, area and/or level to send the messages to. An
55         optional \a label string may be specified which will be added as prefix to all log entries.
56
57         The log stream defaults to senf::StatisticsStream, the level defaults to
58         senf::log::MESSAGE and the are defaults to senf::log::DefaultArea.
59
60         \code
61         // Connect with default parameters
62         stats.output(2u).connect()
63
64         // Send statistics messages to the debug stream at default level (MESSAGE)
65         // Place them in the MyStatistics area. Add 'stat1' prefix to each log message
66         SENF_LOG_DEF_AREA(MyStatistics);
67         stats.output(2u).connect<senf::log::Debug, MyStatistics>("stat1");
68         \endcode
69
70         \ingroup senf_statistics
71      */
72     template <class A1=void, class A2=void, class A3=void>
73     std::auto_ptr< unspecified > StatisticsLogger(std::string const & label="")
74
75 #else
76
77     std::auto_ptr< detail::StatisticsLogger<void,void,void> > StatisticsLogger(
78         std::string const & label="");
79
80     template <class Stream>
81     std::auto_ptr< detail::StatisticsLogger<Stream,void,void> > StatisticsLogger(
82         std::string const & label="");
83
84     template <class Stream, class Area>
85     std::auto_ptr< detail::StatisticsLogger<Stream,Area,void> > StatisticsLogger(
86         std::string const & label="");
87
88     template <class Stream, class Area, class Level>
89     std::auto_ptr< detail::StatisticsLogger<Stream,Area,Level> > StatisticsLogger(
90         std::string const & label="");
91
92 #endif
93
94 }
95
96 //-/////////////////////////////////////////////////////////////////////////////////////////////////
97 #include "StatisticsTargets.cci"
98 #include "StatisticsTargets.ct"
99 #include "StatisticsTargets.cti"
100 #endif
101
102 \f
103 // Local Variables:
104 // mode: c++
105 // fill-column: 100
106 // comment-column: 40
107 // c-file-style: "senf"
108 // indent-tabs-mode: nil
109 // ispell-local-dictionary: "american"
110 // compile-command: "scons -u test"
111 // End: