source: branches/0.8-stable/lib/SVNproperty.h @ 1129

Last change on this file since 1129 was 978, checked in by Peter Johansson, 12 years ago

refs #429. Convert copyright statements to UTF-8

  • 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 978 2009-12-12 20:09:41Z peter $
5
6/*
7  Copyright (C) 2006 Jari Häkkinen
8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
9
10  This file is part of svndigest, http://dev.thep.lu.se/svndigest
11
12  svndigest is free software; you can redistribute it and/or modify it
13  under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 3 of the License, or
15  (at your option) any later version.
16
17  svndigest is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21
22  You should have received a copy of the GNU General Public License
23  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
24*/
25
26#include <map>
27#include <string>
28
29namespace theplu {
30namespace svndigest {
31
32  class SVN;
33
34  ///
35  /// The SVNproperty class is a utility class for taking care of 'svn
36  /// property' information. An 'svn property' is non-recursively
37  /// performed on an item.
38  ///
39  class SVNproperty {
40  public:
41
42    ///
43    /// @brief The contructor.
44    ///
45    /// The constructor performs an 'svn property' on \a path.
46    ///
47    explicit SVNproperty(const std::string& path);
48
49    /**
50       @brief Check whether item used to create this object is binary.
51
52       @return True if item is binary.
53    */
54    inline bool binary(void) const { return binary_; }
55
56    /**
57       @brief Check if item used to create this object has been
58       assigned property svndigest:ignore.
59
60       Currently files with property svndigest:ignore are to be
61       ignored by svndigest. It is the responsibility of the
62       statistics implementer to obey the ignore state.
63
64       @return True if item property svndigest:digest was set.
65    */
66    inline bool svndigest_ignore(void) const { return svndigest_ignore_; }
67
68    /**
69       @brief Get the list of properties for item used to creat this
70       SVNproperty object.
71    */
72    inline const std::map<std::string, std::string>&
73    properties(void) const { return property_; }
74
75  private:
76
77    ///
78    /// @brief Copy Constructor, not implemented.
79    ///
80    SVNproperty(const SVNproperty&);
81
82    bool binary_;
83    std::map<std::string,std::string> property_;
84    bool svndigest_ignore_;
85  };
86
87}} // end of namespace svndigest and namespace theplu
88
89#endif
Note: See TracBrowser for help on using the repository browser.