source: branches/replacing_gnuplot/lib/html_utility.h @ 646

Last change on this file since 646 was 646, checked in by Jari Häkkinen, 13 years ago

Merged trunk changes r608:645 to replacing_gnuplot branch.

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1#ifndef _theplu_svndigest_html_utility_
2#define _theplu_svndigest_html_utility_
3
4// $Id: html_utility.h 646 2008-06-03 22:05:22Z jari $
5
6/*
7  Copyright (C) 2006 Peter Johansson
8  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
9
10  This file is part of svndigest, http://trac.thep.lu.se/svndigest
11
12  svndigest is free software; you can redistribute it and/or modify it
13  under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 2 of the License, or
15  (at your option) any later version.
16
17  svndigest is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25  02111-1307, USA.
26*/
27
28#include <fstream>
29#include <iosfwd>
30#include <string>
31#include <vector>
32
33#include <subversion-1/svn_types.h>
34
35namespace theplu{
36namespace svndigest{
37
38  ///
39  /// @brief create anchor
40  ///
41  /// @param url address to link to
42  /// @param name text visible on page
43  /// @param level '../' is added @a level times before @a href
44  /// @param title title of anchor
45  ///
46  std::string anchor(const std::string& url,
47                     const std::string& name, unsigned int level=0, 
48                     const std::string& title="",
49                     const std::string& color="");
50
51  ///
52  /// @Brief print html footer of page
53  ///
54  void print_footer(std::ostream&);
55   
56  ///
57  /// @brief print html header of page
58  ///
59  /// \param os stream to print to
60  /// \param name
61  /// \param level
62  /// \param user
63  /// \param item total, code, comment, or other
64  /// \param path current path
65  /// \param stats which stats are we in
66  void print_header(std::ostream& os, std::string name, unsigned int level, 
67                    std::string user, std::string item, std::string path,
68                    const std::string& stats);
69
70
71  ///
72  /// @return if trac-revision is set in config file anchor to trac is
73  /// given otherwise just a string corresponding to passed parameter.
74  ///
75  std::string trac_revision(svn_revnum_t, std::string color="");
76
77}} // end of namespace svndigest end of namespace theplu
78
79#endif
Note: See TracBrowser for help on using the repository browser.