source: trunk/lib/SVNproperty.h @ 439

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

Merged patch release 0.6.1 to the trunk. Delta 0.6.1 - 0.6

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1#ifndef _theplu_svndigest_svnproperty_
2#define _theplu_svndigest_svnproperty_
3
4// $Id: SVNproperty.h 439 2007-07-09 21:04:52Z peter $
5
6/*
7  Copyright (C) 2006 Jari Häkkinen
8
9  This file is part of svndigest, http://trac.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 <map>
28#include <string>
29
30namespace theplu {
31namespace svndigest {
32
33  class SVN;
34
35  ///
36  /// The SVNproperty class is a utility class for taking care of 'svn
37  /// property' information. An 'svn property' is non-recursively
38  /// performed on an item.
39  ///
40  class SVNproperty {
41  public:
42
43    ///
44    /// @brief The contructor.
45    ///
46    /// The constructor performs an 'svn property' on \a path.
47    ///
48    explicit SVNproperty(const std::string& path);
49
50    /**
51       @brief Check whether item used to create this object is binary.
52
53       @return True if item is binary.
54    */
55    inline bool binary(void) const { return binary_; }
56
57    /**
58       @brief Check if item used to create this object has been
59       assigned property svndigest:ignore.
60
61       Currently files with property svndigest:ignore are to be
62       ignored by svndigest. It is the responsibility of the
63       statistics implementer to obey the ignore state.
64
65       @return True if item property svndigest:digest was set.
66    */
67    inline bool svndigest_ignore(void) const { return svndigest_ignore_; }
68
69    /**
70       @brief Get the list of properties for item used to creat this
71       SVNproperty object.
72    */
73    inline const std::map<std::string, std::string>&
74    properties(void) const { return property_; }
75
76  private:
77
78    ///
79    /// @brief Copy Constructor, not implemented.
80    ///
81    SVNproperty(const SVNproperty&);
82
83    bool binary_;
84    std::map<std::string,std::string> property_;
85    bool svndigest_ignore_;
86  };
87
88}} // end of namespace svndigest and namespace theplu
89
90#endif
Note: See TracBrowser for help on using the repository browser.