source: trunk/lib/Trac.h @ 293

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

refs #180 support r288:293 [288:293] log:@288:293.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1#ifndef _theplu_svndigest_trac_
2#define _theplu_svndigest_trac_
3
4// $Id: Trac.h 293 2007-05-08 16:02:12Z 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 log1(std::string::const_iterator& first, 
71              const std::string::const_iterator& last);
72
73    bool log2(std::string::const_iterator& first, 
74              const std::string::const_iterator& last);
75
76    bool log3(std::string::const_iterator& first, 
77              const std::string::const_iterator& last);
78
79    bool milestone(std::string::const_iterator& first, 
80                   const std::string::const_iterator& last);
81
82    bool source(std::string::const_iterator& first, 
83                const std::string::const_iterator& last);
84
85    bool ticket(std::string::const_iterator& first, 
86                const std::string::const_iterator& last);
87
88    /// if range (first, last) starts with /#[:digit:]*/ a ticket link
89    /// is written;
90    /// @return if ticket is found iterator pointing to after found
91    /// ticket; else first is returned.
92    bool ticket1(std::string::const_iterator& first, 
93                 const std::string::const_iterator& last);
94
95    bool ticket2(std::string::const_iterator& first, 
96                 const std::string::const_iterator& last);
97
98
99
100    HtmlStream& hs_;
101  };
102
103}} // end of namespace svndigest end of namespace theplu
104
105#endif
Note: See TracBrowser for help on using the repository browser.