source: trunk/lib/Alias.cc @ 815

Last change on this file since 815 was 768, checked in by Peter Johansson, 12 years ago

Merged patch release 0.6.7 to trunk. Delta 0.6.7 - 0.6.6

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1// $Id: Alias.cc 768 2009-01-31 21:30:37Z peter $
2
3/*
4  Copyright (C) 2007, 2008 Peter Johansson
5
6  This file is part of svndigest, http://dev.thep.lu.se/svndigest
7
8  svndigest is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12
13  svndigest is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with svndigest. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#include "Alias.h"
23
24#include <string>
25
26namespace theplu{
27namespace svndigest{
28
29  Alias::Alias(void)
30    : name_(std::string()), id_(0)
31  {}
32
33
34  Alias::Alias(std::string name, size_t id)
35    : name_(name), id_(id)
36  {}
37
38 
39  std::string Alias::name(void) const
40  {
41    return name_;
42  }
43
44
45  size_t Alias::id(void) const
46  {
47    return id_;
48  }
49
50  bool operator<(const Alias& lhs, const Alias& rhs)
51  { 
52    return lhs.name() < rhs.name(); 
53  }
54
55
56  bool operator==(const Alias& lhs, const Alias& rhs)
57  { 
58    return lhs.name() == rhs.name(); 
59  }
60
61}} // end of namespace svndigest and namespace theplu
Note: See TracBrowser for help on using the repository browser.