PGROUTING  3.2
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 &)=delete
 
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 &)=delete
 

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 )
delete

Member Function Documentation

◆ clear()

void pgrouting::Pgr_messages::clear ( )

clear

Clears All the messages

Definition at line 59 of file pgr_messages.cpp.

59  {
60  log.str("");
61  log.clear();
62 
63  notice.str("");
64  notice.clear();
65 
66  error.str("");
67  error.clear();
68 }

References error, log, and notice.

Referenced by do_pgr_pickDeliver().

◆ 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.

53  {
54  auto str = error.str();
55  return str;
56 }

References error.

Referenced by do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().

◆ 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.

36  {
37  auto str = log.str();
38  return str;
39 }

References log.

Referenced by do_pgr_bipartite(), do_pgr_boyerMyrvold(), do_pgr_LTDTree(), do_pgr_makeConnected(), do_pgr_many_withPointsDD(), do_pgr_pickDeliver(), do_pgr_pickDeliverEuclidean(), do_pgr_withPoints(), do_pgr_withPointsKsp(), pgr_bellman_ford(), pgr_dijkstraTR(), and pgrouting::vrp::Pgr_pickDeliver::Pgr_pickDeliver().

◆ 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.

42  {
43  auto str = notice.str();
44  return str;
45 }

References notice.

◆ 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.

48  {
49  return !error.str().empty();
50 }

References error.

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

◆ operator=()

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

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:
pgrouting::Pgr_messages::error
std::ostringstream error
Stores the error information.
Definition: pgr_messages.h:85
pgrouting::Pgr_messages::log
std::ostringstream log
Stores the hint information.
Definition: pgr_messages.h:81
pgrouting::Pgr_messages::notice
std::ostringstream notice
Stores the notice information.
Definition: pgr_messages.h:83