1 | #ifndef _theplu_svndigest_svnproperty_ |
---|
2 | #define _theplu_svndigest_svnproperty_ |
---|
3 | |
---|
4 | // $Id: SVNproperty.h 1137 2010-07-18 20:45:45Z 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 | |
---|
29 | namespace theplu { |
---|
30 | namespace 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 | \return true if propert svncopyright::ignore has been set |
---|
70 | |
---|
71 | \see svndigest_ignore |
---|
72 | */ |
---|
73 | bool svncopyright_ignore(void) const; |
---|
74 | |
---|
75 | /** |
---|
76 | @brief Get the list of properties for item used to creat this |
---|
77 | SVNproperty object. |
---|
78 | */ |
---|
79 | inline const std::map<std::string, std::string>& |
---|
80 | properties(void) const { return property_; } |
---|
81 | |
---|
82 | private: |
---|
83 | |
---|
84 | /// |
---|
85 | /// @brief Copy Constructor, not implemented. |
---|
86 | /// |
---|
87 | SVNproperty(const SVNproperty&); |
---|
88 | |
---|
89 | bool binary_; |
---|
90 | std::map<std::string,std::string> property_; |
---|
91 | bool svndigest_ignore_; |
---|
92 | }; |
---|
93 | |
---|
94 | }} // end of namespace svndigest and namespace theplu |
---|
95 | |
---|
96 | #endif |
---|