PGROUTING  3.2
identifier.cpp
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 
3 Copyright (c) 2017 Celia Virginia Vergara Castillo
5 
6 ------
7 
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 
22  ********************************************************************PGR-GNU*/
23 
24 #include "cpp_common/identifier.h"
25 
26 
27 namespace pgrouting {
28 
29 
31  const size_t _idx,
32  const int64_t _id) :
33  m_idx(_idx),
34  m_id(_id) {}
35 
36 size_t
37 Identifier::idx() const {
38  return m_idx;
39 }
40 
41 int64_t
42 Identifier::id() const {
43  return m_id;
44 }
45 
46 void
47 Identifier::reset_id(int64_t _id) {
48  m_id = _id;
49 }
50 
51 std::ostream& operator<<(std::ostream& log, const Identifier &ident) {
52  log << "id(idx) = " << ident.id() << "(" << ident.idx() << ")";
53  return log;
54 }
55 
56 } // namespace pgrouting
pgrouting::Identifier::idx
size_t idx() const
Definition: identifier.cpp:37
pgrouting::operator<<
std::ostream & operator<<(std::ostream &log, const Basic_vertex &v)
Definition: basic_vertex.cpp:37
identifier.h
pgrouting::Identifier::id
int64_t id() const
Definition: identifier.cpp:42
pgrouting::Identifier::m_idx
size_t m_idx
Definition: identifier.h:52
pgrouting::Identifier::m_id
int64_t m_id
Definition: identifier.h:53
pgrouting::Identifier::reset_id
void reset_id(int64_t)
Definition: identifier.cpp:47
pgrouting::Identifier
Definition: identifier.h:39
pgrouting::Identifier::Identifier
Identifier()=default
pgrouting
Book keeping class for swapping orders between vehicles.
Definition: pgr_alphaShape.cpp:56