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-2004 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This software is licensed as described in the file LICENSE.txt,
00006  * which you should have received as part of this distribution.
00007  *
00008  * This software consists of voluntary contributions made by many
00009  * individuals.  For exact contribution history, see the revision
00010  * history and logs, available at http://rapidsvn.tigris.org/.
00011  * ====================================================================
00012  */
00013 
00014 #ifndef _SVNCPP_PROPERTY_H_
00015 #define _SVNCPP_PROPERTY_H_
00016 
00017 
00018 // Ignore MSVC 6 compiler warning: debug symbol truncated
00019 #if defined (_MSC_VER) && _MSC_VER <= 1200
00020 #pragma warning (disable: 4786)
00021 #endif
00022 
00023 // Ignore MSVC 7 compiler warning: C++ exception specification
00024 #if defined (_MSC_VER) && _MSCVER > 1200 && _MSCVER <= 1310
00025 #pragma warning (disable: 4290)
00026 #endif
00027 
00028 
00029 // stl 
00030 #include <vector>
00031 #include <string>
00032 
00033 // svncpp
00034 #include "svncpp/context.hpp"
00035 #include "svncpp/path.hpp"
00036 
00037 
00038 namespace svn
00039 {
00040   struct PropertyEntry
00041   {
00042     std::string name;
00043     std::string value;
00044 
00045     PropertyEntry (const char * name, const char * value);
00046   };    
00047 
00048   // forward declarations
00049   class Path;
00050 
00054   class Property 
00055   {
00056   public:
00057     Property (Context * context = 0,
00058               const Path & path = "");
00059 
00060     virtual ~Property ();
00061 
00066     const std::vector<PropertyEntry> &
00067     entries () const
00068     {
00069       return m_entries;
00070     }
00071 
00078     void set (const char * name, const char * value);
00079 
00084     void remove (const char * name);
00085 
00086   private:
00087     Context * m_context;
00088     Path m_path;
00089     std::vector<PropertyEntry> m_entries;
00090 
00091     std::string getValue (const char * name);
00092     void list ();
00093 
00094   };
00095 
00096 }
00097 
00098 #endif
00099 /* -----------------------------------------------------------------
00100  * local variables:
00101  * eval: (load-file "../../rapidsvn-dev.el")
00102  * end:
00103  */

Generated on Thu Sep 15 21:20:23 2005 for SvnCpp by  doxygen 1.4.4