00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SVNCPP_STATUS_HPP_
00026 #define _SVNCPP_STATUS_HPP_
00027
00028
00029 #include "svn_wc.h"
00030
00031
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
00190
00191
00192