source: trunk/lib/html_utility.h @ 223

Last change on this file since 223 was 223, checked in by Peter Johansson, 16 years ago

Refs #87

File size: 2.1 KB
Line 
1#ifndef _theplu_svndigest_html_utility_
2#define _theplu_svndigest_html_utility_
3
4// $Id$
5
6/*
7  Copyright (C) 2006 Peter Johansson
8
9  This file is part of svndigest, http://lev.thep.lu.se/trac/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 <iostream>
28#include <fstream>
29#include <iosfwd>
30#include <string>
31#include <vector>
32
33namespace theplu{
34namespace svndigest{
35
36  class Stats;
37  ///
38  /// @brief send anchor to stream @a os
39  ///
40  /// @param address to link to
41  /// @param name text visible on page
42  /// @param level '../' is added @a level times before @a href
43  /// @param title title of anchor
44  ///
45  void anchor(std::ostream& os, const std::string& href, 
46              const std::string& name, u_int level=0, 
47              const std::string& title="");
48
49  ///
50  /// Function translating text to html format. Most character are
51  /// just passing through (unary operation).
52  ///
53  void html(std::istream&, std::ostream&, char delim='\n');
54
55  ///
56  /// @printing cascading style sheet to file name @a str.
57  ///
58  void print_css(const std::string& str);
59
60  ///
61  /// @brief print main page
62  ///
63  void print_main_page(const std::string&, const std::vector<std::string>&,
64                       const Stats&);
65   
66  ///
67  /// @brief print html footer of page
68  ///
69  void print_footer(std::ostream&);
70   
71  ///
72  /// @brief print html header of page
73  ///
74  void print_header(std::ostream&, const std::string& name, u_int level, 
75                    const std::string&, const std::string&);
76
77
78}} // end of namespace svndigest end of namespace theplu
79
80#endif
Note: See TracBrowser for help on using the repository browser.