vrpRouting  0.3
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
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 vrprouting {
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 void
60  log.str("");
61  log.clear();
62 
63  notice.str("");
64  notice.clear();
65 
66  error.str("");
67  error.clear();
68 }
69 
70 
71 } // namespace vrprouting
vrprouting::Pgr_messages::log
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:91
pgr_messages.h
vrprouting::Pgr_messages::has_error
bool has_error() const
gets the contents of notice message
Definition: pgr_messages.cpp:48
vrprouting::Pgr_messages::error
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:95
vrprouting::Pgr_messages::get_notice
std::string get_notice() const
gets the contents of notice message
Definition: pgr_messages.cpp:42
vrprouting::Pgr_messages::get_log
std::string get_log() const
gets the contents of log message
Definition: pgr_messages.cpp:36
vrprouting::Pgr_messages::get_error
std::string get_error() const
gets the contents of error message
Definition: pgr_messages.cpp:53
vrprouting::Pgr_messages::clear
void clear()
Clears all the messages.
Definition: pgr_messages.cpp:59
vrprouting::Pgr_messages::notice
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:93
vrprouting
Definition: base_matrix.cpp:46