SvnCpp
property.hpp
Go to the documentation of this file.
1/*
2 * ====================================================================
3 * Copyright (c) 2002-2018 The RapidSVN Group. All rights reserved.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program (in the file LGPL.txt).
17 * If not, see <http://www.gnu.org/licenses/>.
18 *
19 * This software consists of voluntary contributions made by many
20 * individuals. For exact contribution history, see the revision
21 * history and logs, available at http://rapidsvn.tigris.org/.
22 * ====================================================================
23 */
24
25#ifndef _SVNCPP_PROPERTY_H_
26#define _SVNCPP_PROPERTY_H_
27
28
29// Ignore MSVC 7 compiler warning: C++ exception specification
30#if defined (_MSC_VER) && _MSCVER > 1200 && _MSCVER <= 1310
31#pragma warning (disable: 4290)
32#endif
33
34
35// stl
38
39// svncpp
40#include "svncpp/context.hpp"
41#include "svncpp/path.hpp"
42
43namespace svn
44{
46 {
47 std::string name;
48 std::string value;
49
50 PropertyEntry(const char * name, const char * value);
51 };
52
53 // forward declarations
54 class Path;
55
60 {
61 public:
62 Property(Context * context = 0,
63 const Path & path = "");
64
65 virtual ~Property();
66
71 const std::vector<PropertyEntry> &
72 entries() const
73 {
74 return m_entries;
75 }
76
83 void set(const char * name, const char * value);
84
89 void remove(const char * name);
90
91 private:
92 Context * m_context;
93 Path m_path;
94 std::vector<PropertyEntry> m_entries;
95
96 std::string getValue(const char * name);
97 void list();
98 };
99}
100
101#endif
102/* -----------------------------------------------------------------
103 * local variables:
104 * eval: (load-file "../../rapidsvn-dev.el")
105 * end:
106 */
Definition context.hpp:49
Definition path.hpp:38
Definition property.hpp:60
virtual ~Property()
const std::vector< PropertyEntry > & entries() const
Definition property.hpp:72
Property(Context *context=0, const Path &path="")
void remove(const char *name)
void set(const char *name, const char *value)
Definition annotate_line.hpp:32
Definition property.hpp:46
std::string value
Definition property.hpp:48
std::string name
Definition property.hpp:47
PropertyEntry(const char *name, const char *value)