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

status.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002, 2003 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  * @file status.hpp
00013  */
00014 #ifndef _SVNCPP_STATUS_HPP_
00015 #define _SVNCPP_STATUS_HPP_
00016 
00017 // subversion api
00018 //#include "svn_types.h"
00019 #include "svn_wc.h"
00020 
00021 // svncpp
00022 #include "entry.hpp"
00023 #include "pool.hpp"
00024 
00025 namespace svn
00026 {
00034   class Status
00035   {
00036   public:
00040     Status (const Status & src);
00041 
00048     Status (const char *path = NULL, svn_wc_status_t * status = NULL);
00049 
00053     virtual ~Status ();
00054 
00058     const char *
00059     path () const
00060     {
00061       return m_path->data;
00062     }
00063 
00068     const Entry 
00069     entry () const
00070     {
00071       return Entry (m_status->entry);
00072     }
00073 
00077     const svn_wc_status_kind 
00078     textStatus () const 
00079     {
00080       return m_status->text_status;
00081     }
00082 
00086     const svn_wc_status_kind 
00087     propStatus () const 
00088     {
00089       return m_status->prop_status;
00090     }
00091 
00095     const bool 
00096     isVersioned () const 
00097     {
00098       return m_isVersioned;
00099     }
00100 
00104     const bool 
00105     isLocked () const 
00106     {
00107       return m_status->locked != 0;
00108     }
00109 
00113     const bool 
00114     isCopied () const 
00115     {
00116       return m_status->copied != 0;
00117     }
00118 
00122     const bool
00123     isSwitched () const 
00124     {
00125       return m_status->switched != 0;
00126     }
00127 
00131     const svn_wc_status_kind
00132     reposTextStatus () const 
00133     {
00134       return m_status->repos_text_status;
00135     }
00136 
00140     const svn_wc_status_kind
00141     reposPropStatus () const
00142     {
00143       return m_status->repos_prop_status;
00144     }
00145 
00149     operator svn_wc_status_t * () const 
00150     {
00151       return m_status;
00152     }
00153 
00157     static const char *
00158     statusDescription (const svn_wc_status_kind kind);
00159 
00163     Status &
00164     operator = (const Status &);
00165   private:
00166     svn_wc_status_t * m_status;
00167     svn_string_t * m_path;
00168     Pool m_pool;
00169     bool m_isVersioned;
00170 
00177     void 
00178     init (const char *path, const svn_wc_status_t * status);
00179   };
00180 }
00181 
00182 #endif
00183 /* -----------------------------------------------------------------
00184  * local variables:
00185  * eval: (load-file "../../rapidsvn-dev.el")
00186  * end:
00187  */

Generated on Sat Dec 6 22:47:47 2003 for SvnCpp by doxygen 1.3.4