revision.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2006 The RapidSvn Group.  All rights reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  * 
00010  * This library 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 GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library (in the file LGPL.txt); if not, 
00017  * write to the Free Software Foundation, Inc., 51 Franklin St, 
00018  * Fifth Floor, Boston, MA  02110-1301  USA
00019  *
00020  * This software consists of voluntary contributions made by many
00021  * individuals.  For exact contribution history, see the revision
00022  * history and logs, available at http://rapidsvn.tigris.org/.
00023  * ====================================================================
00024  */
00025 
00026 #ifndef _SVNCPP_REVISION_HPP_
00027 #define _SVNCPP_REVISION_HPP_ 
00028 
00029 // subversion api
00030 #include "svn_types.h"
00031 #include "svn_opt.h"
00032 
00033 // svncpp
00034 #include "datetime.hpp"
00035 
00036 namespace svn
00037 {
00043   class Revision
00044   {
00045   private:
00046     svn_opt_revision_t m_revision;
00047 
00048     void
00049     init (const svn_opt_revision_t * revision);
00050 
00051   public:
00052     static const svn_opt_revision_kind START;
00053     static const svn_opt_revision_kind BASE;
00054     static const svn_opt_revision_kind HEAD;
00055     static const svn_opt_revision_kind WORKING;
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     const svn_revnum_t 
00111     revnum () const;
00112 
00116     const svn_opt_revision_kind 
00117     kind () const;
00118 
00122     const apr_time_t
00123     date () const;
00124   };
00125 }
00126 
00127 #endif
00128 /* -----------------------------------------------------------------
00129  * local variables:
00130  * eval: (load-file "../../rapidsvn-dev.el")
00131  * end:
00132  */

Generated on Fri Dec 8 18:57:44 2006 for SvnCpp by  doxygen 1.4.7