source: trunk/lib/Trac.h @ 288

Last change on this file since 288 was 288, checked in by Peter Johansson, 14 years ago

declaring more functions in Trac class. refs #178 and #180.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1#ifndef _theplu_svndigest_trac_
2#define _theplu_svndigest_trac_
3
4// $Id: Trac.h 288 2007-05-07 16:22:33Z peter $
5
6/*
7  Copyright (C) 2007 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 <string>
28
29namespace theplu{
30namespace svndigest{
31
32  class HtmlStream;
33
34  ///
35  /// Class responsible for filtering log messages and detect
36  /// trac:links and create appropriate anchors.
37  ///
38  class Trac
39  {
40  public:
41    ///
42    /// \Constructor
43    ///
44    Trac(HtmlStream& html);
45   
46    ///
47    ///
48    ///
49    void print(std::string str);
50
51  private:
52    bool changeset(std::string::const_iterator& first, 
53                   const std::string::const_iterator& last);
54
55    bool comment(std::string::const_iterator& first, 
56                 const std::string::const_iterator& last);
57
58    bool log(std::string::const_iterator& first, 
59             const std::string::const_iterator& last);
60
61    bool milestone(std::string::const_iterator& first, 
62                   const std::string::const_iterator& last);
63
64    bool source(std::string::const_iterator& first, 
65                const std::string::const_iterator& last);
66
67    /// if range (first, last) starts with /#[:digit:]*/ a ticket link
68    /// is written;
69    /// @return if ticket is found iterator pointing to after found
70    /// ticket; else first is returned.
71    bool ticket(std::string::const_iterator& first, 
72                const std::string::const_iterator& last);
73
74
75    HtmlStream& hs_;
76  };
77
78}} // end of namespace svndigest end of namespace theplu
79
80#endif
Note: See TracBrowser for help on using the repository browser.