00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _SVNCPP_STATUS_HPP_
00015 #define _SVNCPP_STATUS_HPP_
00016
00017
00018
00019 #include "svn_wc.h"
00020
00021
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 ()
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
00185
00186
00187