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 00025 #ifndef _SVNCPP_REVISION_HPP_ 00026 #define _SVNCPP_REVISION_HPP_ 00027 00028 // subversion api 00029 #include "svn_types.h" 00030 #include "svn_opt.h" 00031 00032 // svncpp 00033 #include "datetime.hpp" 00034 00035 namespace svn 00036 { 00042 class Revision 00043 { 00044 private: 00045 svn_opt_revision_t m_revision; 00046 00047 void 00048 init(const svn_opt_revision_t * revision); 00049 00050 public: 00051 static const Revision START; 00052 static const Revision BASE; 00053 static const Revision HEAD; 00054 static const Revision WORKING; 00055 static const Revision UNSPECIFIED; 00056 00062 Revision(const svn_opt_revision_t * revision); 00063 00069 Revision(const svn_revnum_t revnum); 00070 00076 Revision(const svn_opt_revision_kind kind = svn_opt_revision_unspecified); 00077 00083 Revision(const DateTime dateTime); 00084 00090 Revision(const Revision & revision); 00091 00095 const svn_opt_revision_t * 00096 revision() const; 00097 00102 operator svn_opt_revision_t * () 00103 { 00104 return &m_revision; 00105 } 00106 00110 svn_revnum_t 00111 revnum() const; 00112 00116 svn_opt_revision_kind 00117 kind() const; 00118 00123 operator svn_opt_revision_kind() const 00124 { 00125 return kind(); 00126 } 00127 00131 apr_time_t 00132 date() const; 00133 }; 00134 } 00135 00136 #endif 00137 /* ----------------------------------------------------------------- 00138 * local variables: 00139 * eval: (load-file "../../rapidsvn-dev.el") 00140 * end: 00141 */