revision.hpp
Go to the documentation of this file.
/*
* ====================================================================
* Copyright (c) 2002-2009 The RapidSvn Group. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (in the file GPL.txt.
* If not, see <http://www.gnu.org/licenses/>.
*
* This software consists of voluntary contributions made by many
* individuals. For exact contribution history, see the revision
* history and logs, available at http://rapidsvn.tigris.org/.
* ====================================================================
*/
#ifndef _SVNCPP_REVISION_HPP_
#define _SVNCPP_REVISION_HPP_
// subversion api
#include "svn_types.h"
#include "svn_opt.h"
// svncpp
#include "datetime.hpp"
namespace svn
{
class Revision
{
private:
svn_opt_revision_t m_revision;
void
init(const svn_opt_revision_t * revision);
public:
static const Revision START;
static const Revision BASE;
static const Revision HEAD;
static const Revision WORKING;
static const Revision UNSPECIFIED;
Revision(const svn_opt_revision_t * revision);
Revision(const svn_revnum_t revnum);
Revision(const svn_opt_revision_kind kind = svn_opt_revision_unspecified);
Revision(const DateTime dateTime);
Revision(const Revision & revision);
const svn_opt_revision_t *
revision() const;
operator svn_opt_revision_t * ()
{
return &m_revision;
}
svn_revnum_t
revnum() const;
svn_opt_revision_kind
kind() const;
operator svn_opt_revision_kind() const
{
return kind();
}
apr_time_t
date() const;
};
}
#endif
/* -----------------------------------------------------------------
* local variables:
* eval: (load-file "../../rapidsvn-dev.el")
* end:
*/
svn::Revision::UNSPECIFIED
static const Revision UNSPECIFIED
Definition: revision.hpp:55
svn::Revision::Revision
Revision(const svn_opt_revision_t *revision)
svn::Revision::date
apr_time_t date() const
svn::Revision::WORKING
static const Revision WORKING
Definition: revision.hpp:54
svn::Revision
Definition: revision.hpp:42
svn
Definition: annotate_line.hpp:31
svn::Revision::BASE
static const Revision BASE
Definition: revision.hpp:52
svn::Revision::kind
svn_opt_revision_kind kind() const
svn::Revision::START
static const Revision START
Definition: revision.hpp:51
svn::DateTime
Definition: datetime.hpp:39
datetime.hpp
svn::Revision::HEAD
static const Revision HEAD
Definition: revision.hpp:53
svn::Revision::revision
const svn_opt_revision_t * revision() const
svn::Revision::revnum
svn_revnum_t revnum() const