source: tags/0.6.8/lib/SVNproperty.h @ 848

Last change on this file since 848 was 731, checked in by Peter Johansson, 13 years ago

update copyright statements

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