PGROUTING  3.1
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 &)=default
 
void clear ()
 clear 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 &)=default
 

Public Attributes

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

◆ Pgr_messages() [1/2]

pgrouting::Pgr_messages::Pgr_messages ( )
default

◆ Pgr_messages() [2/2]

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

Member Function Documentation

◆ clear()

void pgrouting::Pgr_messages::clear ( )

clear

Clears All the messages

Definition at line 59 of file pgr_messages.cpp.

References error, log, and notice.

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

59  {
60  log.str("");
61  log.clear();
62 
63  notice.str("");
64  notice.clear();
65 
66  error.str("");
67  error.clear();
68 }
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:81
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:85
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:83

◆ get_error()

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(), 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:85

◆ get_log()

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(), pgr_bellman_ford(), pgr_dijkstraTR(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().

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

◆ get_notice()

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.

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

◆ has_error()

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(), and do_pgr_withPointsKsp().

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

◆ operator=()

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

Member Data Documentation

◆ error

◆ log

◆ notice

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

Stores the notice information.

Definition at line 83 of file pgr_messages.h.

Referenced by clear(), and get_notice().


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