Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Related Pages

property.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2005 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library (in the file LGPL.txt); if not, 
00017  * write to the Free Software Foundation, Inc., 51 Franklin St, 
00018  * Fifth Floor, Boston, MA  02110-1301  USA
00019  *
00020  * This software consists of voluntary contributions made by many
00021  * individuals.  For exact contribution history, see the revision
00022  * history and logs, available at http://rapidsvn.tigris.org/.
00023  * ====================================================================
00024  */
00025 
00026 #ifndef _SVNCPP_PROPERTY_H_
00027 #define _SVNCPP_PROPERTY_H_
00028 
00029 
00030 // Ignore MSVC 6 compiler warning: debug symbol truncated
00031 #if defined (_MSC_VER) && _MSC_VER <= 1200
00032 #pragma warning (disable: 4786)
00033 #endif
00034 
00035 // Ignore MSVC 7 compiler warning: C++ exception specification
00036 #if defined (_MSC_VER) && _MSCVER > 1200 && _MSCVER <= 1310
00037 #pragma warning (disable: 4290)
00038 #endif
00039 
00040 
00041 // stl 
00042 #include <vector>
00043 #include <string>
00044 
00045 // svncpp
00046 #include "svncpp/context.hpp"
00047 #include "svncpp/path.hpp"
00048 
00049 
00050 namespace svn
00051 {
00052   struct PropertyEntry
00053   {
00054     std::string name;
00055     std::string value;
00056 
00057     PropertyEntry (const char * name, const char * value);
00058   };    
00059 
00060   // forward declarations
00061   class Path;
00062 
00066   class Property 
00067   {
00068   public:
00069     Property (Context * context = 0,
00070               const Path & path = "");
00071 
00072     virtual ~Property ();
00073 
00078     const std::vector<PropertyEntry> &
00079     entries () const
00080     {
00081       return m_entries;
00082     }
00083 
00090     void set (const char * name, const char * value);
00091 
00096     void remove (const char * name);
00097 
00098   private:
00099     Context * m_context;
00100     Path m_path;
00101     std::vector<PropertyEntry> m_entries;
00102 
00103     std::string getValue (const char * name);
00104     void list ();
00105 
00106   };
00107 
00108 }
00109 
00110 #endif
00111 /* -----------------------------------------------------------------
00112  * local variables:
00113  * eval: (load-file "../../rapidsvn-dev.el")
00114  * end:
00115  */

Generated on Tue Oct 25 23:07:20 2005 for SvnCpp by  doxygen 1.4.4