source: trunk/lib/Commitment.h @ 255

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

added class Commitment

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#ifndef _theplu_svndigest_commitment_
2#define _theplu_svndigest_commitment_
3
4// $Id: Commitment.h 255 2007-04-30 08:07:40Z 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  /**
33     The Commitment is an aggregrate containing the information from
34     one commitment in the log.
35
36     \see SVNlog
37  */
38  class Commitment {
39  public:
40
41    /**
42       \brief The contructor.
43    */
44    Commitment(std::string author, std::string date, std::string msg, 
45               size_t rev);
46
47    /**
48       \return Author
49    */
50    inline std::string author(void) const { return author_; }
51
52    /**
53       \return Date
54    */
55    inline std::string date(void) const { return date_; }
56
57    /**
58       \return Message
59    */
60    inline std::string message(void) const { return msg_; }
61
62    /**
63       \return Revision
64    */
65    inline size_t revision(void) const { return rev_; }
66
67  private:
68    // Using compiler-generated Copy Constructor.
69    // Commitment(const Commitment&);
70    //
71    // Using compiler-generated Copy assignment.
72    // Commitment& operator=(const Commitment&);
73
74    std::string author_;
75    std::string date_;
76    std::string msg_;
77    size_t rev_;
78
79  };
80
81}} // end of namespace svndigest and namespace theplu
82
83#endif
Note: See TracBrowser for help on using the repository browser.