source: trunk/lib/HtmlStream.h @ 687

Last change on this file since 687 was 687, checked in by Peter Johansson, 13 years ago

Merged patch release 0.6.6 to trunk. Delta 0.6.6 - 0.6.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#ifndef _theplu_svndigest_html_stream_
2#define _theplu_svndigest_html_stream_
3
4// $Id: HtmlStream.h 687 2008-08-04 19:37:10Z peter $
5
6/*
7  Copyright (C) 2007 Peter Johansson
8
9  This file is part of svndigest, http://dev.thep.lu.se/svndigest
10
11  svndigest is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15
16  svndigest is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  02111-1307, USA.
25*/
26
27#include "HtmlBuf.h"
28
29#include <map>
30#include <fstream>
31#include <sstream>
32
33namespace theplu{
34namespace svndigest{
35  ///
36  /// \brief Convenient class for using HtmlBuf.
37  ///
38  /// Class is created from another ostream, whose buffer is used to
39  /// create an internal HtmlBuf. In other words, when this class is
40  /// used, typical with operator<<, data is sent to the HtmlBuffer,
41  /// which transforms it as appropriate and sends it further to its
42  /// target buffer. The target buffer is the buffer of the ostream
43  /// this class is created of.
44  ///
45  class HtmlStream : public std::ostream
46  {
47  public:
48    ///
49    /// Creates a HtmlBuf from target.rdbuf().
50    ///
51    HtmlStream(std::ostream& target);
52
53    ///
54    /// @brief Destructor
55    ///
56    ~HtmlStream(void);
57
58    ///
59    /// \return reference to underlying ostream
60    ///
61    std::ostream& stream(void);
62
63  private:
64    ///
65    /// @brief Copy Constructor, not implemented
66    ///
67    HtmlStream(const HtmlStream&);
68
69    HtmlBuf hbuf_;
70    std::ostream& os_;
71  };
72
73}} // end of namespace svndigest and namespace theplu
74
75#endif
Note: See TracBrowser for help on using the repository browser.