PGROUTING  2.6-dev
pgrouting::Pgr_messages Class Reference

#include "pgr_messages.h"

Inheritance diagram for pgrouting::Pgr_messages:
Collaboration diagram for pgrouting::Pgr_messages:

Public Member Functions

 Pgr_messages ()=default
 
 Pgr_messages (const Pgr_messages &)
 
void clear ()
 clear More...
 
std::string get_dbglog () const
 get_error More...
 
std::string get_error () const
 get_error More...
 
std::string get_log () const
 get_log More...
 
std::string get_notice () const
 get_notice More...
 
bool has_error () const
 get_error More...
 
Pgr_messagesoperator= (const Pgr_messages &)
 

Public Attributes

std::ostringstream dbg_log
 
std::ostringstream error
 Stores the error information. More...
 
std::ostringstream log
 Stores the hint information. More...
 
std::ostringstream notice
 Stores the notice information. More...
 

Detailed Description

Definition at line 39 of file pgr_messages.h.

Constructor & Destructor Documentation

pgrouting::Pgr_messages::Pgr_messages ( )
default
pgrouting::Pgr_messages::Pgr_messages ( const Pgr_messages )
inline

Definition at line 42 of file pgr_messages.h.

42 { }

Member Function Documentation

void pgrouting::Pgr_messages::clear ( )

clear

Clears All the messages

Definition at line 66 of file pgr_messages.cpp.

References dbg_log, error, log, and notice.

Referenced by pgrouting::vrp::Fleet::build_fleet(), do_pgr_pickDeliver(), operator=(), and pgrouting::vrp::PD_problem::PD_problem().

66  {
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 }
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:102
std::ostringstream dbg_log
Definition: pgr_messages.h:108
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:106
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:104

Here is the caller graph for this function:

std::string pgrouting::Pgr_messages::get_dbglog ( ) const

get_error

Returns
the current contents of the log and clears the log

Definition at line 60 of file pgr_messages.cpp.

References dbg_log.

Referenced by operator=().

60  {
61  return dbg_log.str();
62 }
std::ostringstream dbg_log
Definition: pgr_messages.h:108

Here is the caller graph for this function:

std::string pgrouting::Pgr_messages::get_error ( ) const

get_error

Returns
the current contents of the log and clears the log

Definition at line 53 of file pgr_messages.cpp.

References error.

Referenced by pgrouting::vrp::Fleet::build_fleet(), do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), pgrouting::vrp::Fleet::is_fleet_ok(), operator=(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().

53  {
54  auto str = error.str();
55  return str;
56 }
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:106

Here is the caller graph for this function:

std::string pgrouting::Pgr_messages::get_log ( ) const

get_log

Returns
the current contents of the log and clears the log

Definition at line 36 of file pgr_messages.cpp.

References log.

Referenced by do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), pgrouting::vrp::Initial_solution::do_while_foo(), pgrouting::vrp::Fleet::get_truck(), pgrouting::vrp::Pgr_pickDeliver::nodesOK(), and operator=().

36  {
37  auto str = log.str();
38  return str;
39 }
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:102

Here is the caller graph for this function:

std::string pgrouting::Pgr_messages::get_notice ( ) const

get_notice

Returns
the current contents of the log and clears the log

Definition at line 42 of file pgr_messages.cpp.

References notice.

Referenced by operator=().

42  {
43  auto str = notice.str();
44  return str;
45 }
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:104

Here is the caller graph for this function:

bool pgrouting::Pgr_messages::has_error ( ) const

get_error

Returns
the current contents of the log and clears the log

Definition at line 48 of file pgr_messages.cpp.

References error.

Referenced by do_pgr_many_withPointsDD(), do_pgr_withPoints(), do_pgr_withPointsKsp(), and operator=().

48  {
49  return !error.str().empty();
50 }
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:106

Here is the caller graph for this function:

Pgr_messages& pgrouting::Pgr_messages::operator= ( const Pgr_messages )
inline

Definition at line 43 of file pgr_messages.h.

References clear(), get_dbglog(), get_error(), get_log(), get_notice(), has_error(), and log.

43  {
44  return *this;
45  }

Here is the call graph for this function:

Member Data Documentation

std::ostringstream pgrouting::Pgr_messages::dbg_log
mutable
std::ostringstream pgrouting::Pgr_messages::notice
mutable

Stores the notice information.

Definition at line 104 of file pgr_messages.h.

Referenced by clear(), and get_notice().


The documentation for this class was generated from the following files: