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

status.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 #ifndef _SVNCPP_STATUS_HPP_
00026 #define _SVNCPP_STATUS_HPP_
00027 
00028 // subversion api
00029 #include "svn_wc.h"
00030 
00031 // svncpp
00032 #include "svncpp/entry.hpp"
00033 #include "svncpp/pool.hpp"
00034 
00035 
00036 namespace svn
00037 {
00045   class Status
00046   {
00047   public:
00051     Status (const Status & src);
00052 
00059     Status (const char *path = NULL, svn_wc_status_t * status = NULL);
00060 
00064     virtual ~Status ();
00065 
00069     const char *
00070     path () const
00071     {
00072       return m_path->data;
00073     }
00074 
00079     const Entry 
00080     entry () const
00081     {
00082       return Entry (m_status->entry);
00083     }
00084 
00088     const svn_wc_status_kind 
00089     textStatus () const 
00090     {
00091       return m_status->text_status;
00092     }
00093 
00097     const svn_wc_status_kind 
00098     propStatus () const 
00099     {
00100       return m_status->prop_status;
00101     }
00102 
00106     const bool 
00107     isVersioned () const 
00108     {
00109       return m_isVersioned;
00110     }
00111 
00115     const bool 
00116     isLocked () const 
00117     {
00118       return m_status->locked != 0;
00119     }
00120 
00124     const bool 
00125     isCopied () const 
00126     {
00127       return m_status->copied != 0;
00128     }
00129 
00133     const bool
00134     isSwitched () const 
00135     {
00136       return m_status->switched != 0;
00137     }
00138 
00142     const svn_wc_status_kind
00143     reposTextStatus () const 
00144     {
00145       return m_status->repos_text_status;
00146     }
00147 
00151     const svn_wc_status_kind
00152     reposPropStatus () const
00153     {
00154       return m_status->repos_prop_status;
00155     }
00156 
00160     operator svn_wc_status_t * () const 
00161     {
00162       return m_status;
00163     }
00164 
00168     Status &
00169     operator = (const Status &);
00170   private:
00171     svn_wc_status_t * m_status;
00172     svn_string_t * m_path;
00173     Pool m_pool;
00174     bool m_isVersioned;
00175 
00182     void 
00183     init (const char *path, const svn_wc_status_t * status);
00184   };
00185 }
00186 
00187 #endif
00188 /* -----------------------------------------------------------------
00189  * local variables:
00190  * eval: (load-file "../../rapidsvn-dev.el")
00191  * end:
00192  */

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