source: trunk/lib/Commitment.h @ 687

Last change on this file since 687 was 687, checked in by Peter Johansson, 13 years ago

Merged patch release 0.6.6 to trunk. Delta 0.6.6 - 0.6.5

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1#ifndef _theplu_svndigest_commitment_
2#define _theplu_svndigest_commitment_
3
4// $Id: Commitment.h 687 2008-08-04 19:37:10Z peter $
5
6/*
7  Copyright (C) 2007 Peter Johansson
8
9  This file is part of svndigest, http://dev.thep.lu.se/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
29#include <subversion-1/svn_types.h>
30
31namespace theplu {
32namespace svndigest {
33
34  /**
35     The Commitment is an aggregrate containing the information from
36     one commitment in the log.
37
38     \see SVNlog
39  */
40  class Commitment {
41  public:
42
43    /**
44       \brief Default contructor.
45    */
46    Commitment(void);
47
48    /**
49       \brief The contructor.
50    */
51    Commitment(std::string author, std::string date, std::string msg, 
52               svn_revnum_t rev);
53
54    /**
55       \return Author
56    */
57    inline const std::string& author(void) const { return author_; }
58
59    /**
60       \return Date
61    */
62    inline const std::string& date(void) const { return date_; }
63
64    /**
65       \return Message
66    */
67    inline const std::string& message(void) const { return msg_; }
68
69    /**
70       \return Revision
71    */
72    inline svn_revnum_t revision(void) const { return rev_; }
73
74  private:
75    // Using compiler-generated Copy Constructor.
76    // Commitment(const Commitment&);
77    //
78    // Using compiler-generated Copy assignment.
79    // Commitment& operator=(const Commitment&);
80
81    std::string author_;
82    std::string date_;
83    std::string msg_;
84    svn_revnum_t rev_;
85
86  };
87
88 
89  struct GreaterRevision
90  {
91    inline bool operator()(const Commitment& lhs, const Commitment& rhs)
92    { return lhs.revision()>rhs.revision(); }
93  };
94
95}} // end of namespace svndigest and namespace theplu
96
97#endif
Note: See TracBrowser for help on using the repository browser.