PGROUTING  2.5
pgr_messages.cpp
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 
3 FILE: pgr_pickDeliver.h
4 
5 Copyright (c) 2015 pgRouting developers
6 Mail: project@pgrouting.org
7 
8 ------
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 
24  ********************************************************************PGR-GNU*/
25 
26 
27 #include <string>
28 #include <sstream>
30 
31 namespace pgrouting {
32 
33 
34 
35 std::string
37  auto str = log.str();
38  return str;
39 }
40 
41 std::string
43  auto str = notice.str();
44  return str;
45 }
46 
47 bool
49  return !error.str().empty();
50 }
51 
52 std::string
54  auto str = error.str();
55  return str;
56 }
57 
58 #ifndef NDEBUG
59 std::string
61  return dbg_log.str();
62 }
63 #endif
64 
65 void
67  log.str("");
68  log.clear();
69 
70  notice.str("");
71  notice.clear();
72 
73  error.str("");
74  error.clear();
75 
76 #ifndef NDEBUG
77  dbg_log.str("");
78  dbg_log.clear();
79 #endif
80 }
81 
82 
83 } // namespace pgrouting
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:102
std::string get_log() const
get_log
std::ostringstream dbg_log
Definition: pgr_messages.h:108
std::string get_notice() const
get_notice
std::string get_error() const
get_error
std::string get_dbglog() const
get_error
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:106
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:104
Book keeping class for swapping orders between vehicles.
Definition: basic_edge.cpp:28
bool has_error() const
get_error