source: trunk/lib/SVNproperty.h @ 693

Last change on this file since 693 was 693, checked in by Jari Häkkinen, 13 years ago

Fixes #339. Change to GPLv3.

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