annotate_line.hpp

Go to the documentation of this file.
00001 /*
00002  * ====================================================================
00003  * Copyright (c) 2002-2008 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 #ifndef _SVNCPP_ANNOTATE_LINE_HPP_
00026 #define _SVNCPP_ANNOTATE_LINE_HPP_
00027 
00028 // subversion api
00029 #include "svn_types.h"
00030 
00031 
00032 namespace svn
00033 {
00037   class AnnotateLine
00038   {
00039   public:
00040     AnnotateLine (apr_int64_t line_no,
00041                   svn_revnum_t revision,
00042                   const char *author,
00043                   const char *date,
00044                   const char *line)
00045     : m_line_no (line_no), m_revision (revision), 
00046       m_author (author), m_date (date), m_line (line)
00047     {
00048     }
00049 
00050     AnnotateLine ( const AnnotateLine &other)
00051     : m_line_no (other.m_line_no), m_revision (other.m_revision), 
00052       m_author (other.m_author), m_date (other.m_date), 
00053       m_line (other.m_line)
00054     {
00055     }
00056 
00060     virtual ~AnnotateLine ()
00061     {
00062     }
00063 
00064     apr_int64_t 
00065     lineNumber () const
00066     {
00067       return m_line_no;
00068     }
00069     svn_revnum_t 
00070     revision () const
00071     {
00072       return m_revision;
00073     }
00074 
00075 
00076     const std::string &
00077     author () const
00078     {
00079       return m_author;
00080     }
00081 
00082 
00083     const std::string &
00084     date () const
00085     {
00086       return m_date;
00087     }
00088 
00089 
00090     const std::string &
00091     line () const
00092     {
00093       return m_line;
00094     }
00095 
00096   private:
00097     apr_int64_t m_line_no;
00098     svn_revnum_t m_revision;
00099     std::string m_author;
00100     std::string m_date;
00101     std::string m_line;
00102   };
00103 }
00104 
00105 #endif
00106 /* -----------------------------------------------------------------
00107  * local variables:
00108  * eval: (load-file "../../rapidsvn-dev.el")
00109  * end:
00110  */

Generated on Fri Mar 7 23:09:11 2008 for SvnCpp by  doxygen 1.5.3