SvnCpp
|
00001 /* 00002 * ==================================================================== 00003 * Copyright (c) 2002-2009 The RapidSvn Group. All rights reserved. 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program 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 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program (in the file GPL.txt. 00017 * If not, see <http://www.gnu.org/licenses/>. 00018 * 00019 * This software consists of voluntary contributions made by many 00020 * individuals. For exact contribution history, see the revision 00021 * history and logs, available at http://rapidsvn.tigris.org/. 00022 * ==================================================================== 00023 */ 00024 #ifndef _SVNCPP_ENTRY_HPP_ 00025 #define _SVNCPP_ENTRY_HPP_ 00026 00027 // subversion api 00028 #include "svn_wc.h" 00029 00030 // svncpp 00031 #include "svncpp/pool.hpp" 00032 00033 00034 namespace svn 00035 { 00040 class Entry 00041 { 00042 public: 00053 Entry(const svn_wc_entry_t * src = 0); 00054 00058 Entry(const Entry & src); 00059 00063 virtual ~Entry(); 00064 00073 bool isValid() const 00074 { 00075 return m_valid; 00076 } 00077 00081 const char * 00082 name() const 00083 { 00084 return m_entry->name; 00085 } 00086 00090 svn_revnum_t 00091 revision() const 00092 { 00093 return m_entry->revision; 00094 } 00095 00099 const char * 00100 url() const 00101 { 00102 return m_entry->url; 00103 } 00104 00108 const char * 00109 repos() const 00110 { 00111 return m_entry->repos; 00112 } 00113 00117 const char * 00118 uuid() const 00119 { 00120 return m_entry->uuid; 00121 } 00122 00126 svn_node_kind_t 00127 kind() const 00128 { 00129 return m_entry->kind; 00130 } 00131 00135 svn_wc_schedule_t 00136 schedule() const 00137 { 00138 return m_entry->schedule; 00139 } 00140 00144 bool 00145 isCopied() const 00146 { 00147 return m_entry->copied != 0; 00148 } 00149 00153 bool 00154 isDeleted() const 00155 { 00156 return m_entry->deleted != 0; 00157 } 00158 00162 bool 00163 isAbsent() const 00164 { 00165 return m_entry->absent != 0; 00166 } 00167 00171 const char * 00172 copyfromUrl() const 00173 { 00174 return m_entry->copyfrom_url; 00175 } 00176 00180 svn_revnum_t 00181 copyfromRev() const 00182 { 00183 return m_entry->copyfrom_rev; 00184 } 00185 00189 const char * 00190 conflictOld() const 00191 { 00192 return m_entry->conflict_old; 00193 } 00194 00198 const char * 00199 conflictNew() const 00200 { 00201 return m_entry->conflict_new; 00202 } 00203 00207 const char * 00208 conflictWrk() const 00209 { 00210 return m_entry->conflict_wrk; 00211 } 00212 00216 const char * 00217 prejfile() const 00218 { 00219 return m_entry->prejfile; 00220 } 00221 00226 apr_time_t 00227 textTime() const 00228 { 00229 return m_entry->text_time; 00230 } 00231 00236 apr_time_t 00237 propTime() const 00238 { 00239 return m_entry->prop_time; 00240 } 00241 00246 const char * 00247 checksum() const 00248 { 00249 return m_entry->checksum; 00250 } 00251 00255 svn_revnum_t 00256 cmtRev() const 00257 { 00258 return m_entry->cmt_rev; 00259 } 00260 00264 apr_time_t 00265 cmtDate() const 00266 { 00267 return m_entry->cmt_date; 00268 } 00269 00273 const char * 00274 cmtAuthor() const 00275 { 00276 return m_entry->cmt_author; 00277 } 00278 00282 operator svn_wc_entry_t * () const 00283 { 00284 return m_entry; 00285 } 00286 00290 Entry & 00291 operator = (const Entry &); 00292 00293 private: 00294 svn_wc_entry_t * m_entry; 00295 Pool m_pool; 00296 bool m_valid; 00297 00301 void 00302 init(const svn_wc_entry_t * src); 00303 }; 00304 00305 } 00306 00307 #endif 00308 /* ----------------------------------------------------------------- 00309 * local variables: 00310 * eval: (load-file "../../rapidsvn-dev.el") 00311 * end: 00312 */