source: trunk/lib/Trac.h @ 292

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

Trac support: r292 [292] changeset:292 refs #180

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1#ifndef _theplu_svndigest_trac_
2#define _theplu_svndigest_trac_
3
4// $Id: Trac.h 292 2007-05-08 15:06:18Z 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 changeset1(std::string::const_iterator& first, 
56                   const std::string::const_iterator& last);
57
58    bool changeset2(std::string::const_iterator& first, 
59                   const std::string::const_iterator& last);
60
61    bool changeset3(std::string::const_iterator& first, 
62                   const std::string::const_iterator& last);
63
64    bool comment(std::string::const_iterator& first, 
65                 const std::string::const_iterator& last);
66
67    bool log(std::string::const_iterator& first, 
68             const std::string::const_iterator& last);
69
70    bool milestone(std::string::const_iterator& first, 
71                   const std::string::const_iterator& last);
72
73    bool source(std::string::const_iterator& first, 
74                const std::string::const_iterator& last);
75
76    bool ticket(std::string::const_iterator& first, 
77                const std::string::const_iterator& last);
78
79    /// if range (first, last) starts with /#[:digit:]*/ a ticket link
80    /// is written;
81    /// @return if ticket is found iterator pointing to after found
82    /// ticket; else first is returned.
83    bool ticket1(std::string::const_iterator& first, 
84                 const std::string::const_iterator& last);
85
86    bool ticket2(std::string::const_iterator& first, 
87                 const std::string::const_iterator& last);
88
89
90
91    HtmlStream& hs_;
92  };
93
94}} // end of namespace svndigest end of namespace theplu
95
96#endif
Note: See TracBrowser for help on using the repository browser.