source: trunk/lib/Alias.cc

Last change on this file was 1515, checked in by Peter Johansson, 9 years ago

update copyright years

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