source: trunk/lib/SVNproperty.h @ 1267

Last change on this file since 1267 was 1267, checked in by Peter Johansson, 11 years ago

updating copyright statements

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1#ifndef _theplu_svndigest_svnproperty_
2#define _theplu_svndigest_svnproperty_
3
4// $Id: SVNproperty.h 1267 2010-11-02 03:56:19Z peter $
5
6/*
7  Copyright (C) 2006 Jari Häkkinen
8  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
9  Copyright (C) 2010 Peter Johansson
10
11  This file is part of svndigest, http://dev.thep.lu.se/svndigest
12
13  svndigest is free software; you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation; either version 3 of the License, or
16  (at your option) any later version.
17
18  svndigest is distributed in the hope that it will be useful, but
19  WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22
23  You should have received a copy of the GNU General Public License
24  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
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       \return true if propert svncopyright::ignore has been set
71
72       \see svndigest_ignore
73     */
74    bool svncopyright_ignore(void) const;
75
76    /**
77       @brief Get the list of properties for item used to creat this
78       SVNproperty object.
79    */
80    inline const std::map<std::string, std::string>&
81    properties(void) const { return property_; }
82
83  private:
84
85    ///
86    /// @brief Copy Constructor, not implemented.
87    ///
88    SVNproperty(const SVNproperty&);
89
90    bool binary_;
91    std::map<std::string,std::string> property_;
92    bool svndigest_ignore_;
93  };
94
95}} // end of namespace svndigest and namespace theplu
96
97#endif
Note: See TracBrowser for help on using the repository browser.