|
PGROUTING
3.2
|
Go to the documentation of this file.
61 std::vector < pgr_vertex_color_rt >
103 std::ostringstream log;
104 std::ostringstream err;
105 std::ostringstream notice;
113 std::vector < pgr_vertex_color_rt > results;
122 auto count = results.size();
125 (*return_tuples) = NULL;
127 notice <<
"No traversal found";
128 *log_msg =
pgr_msg(notice.str().c_str());
132 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
133 for (
size_t i = 0; i < count; i++) {
134 *((*return_tuples) + i) = results[i];
136 (*return_count) = count;
139 *log_msg = log.str().empty()?
142 *notice_msg = notice.str().empty()?
146 (*return_tuples) =
pgr_free(*return_tuples);
148 err << except.
what();
149 *err_msg =
pgr_msg(err.str().c_str());
150 *log_msg =
pgr_msg(log.str().c_str());
151 }
catch (std::exception &except) {
152 (*return_tuples) =
pgr_free(*return_tuples);
154 err << except.what();
155 *err_msg =
pgr_msg(err.str().c_str());
156 *log_msg =
pgr_msg(log.str().c_str());
158 (*return_tuples) =
pgr_free(*return_tuples);
160 err <<
"Caught unknown exception!";
161 *err_msg =
pgr_msg(err.str().c_str());
162 *log_msg =
pgr_msg(log.str().c_str());
T * pgr_alloc(std::size_t size, T *ptr)
allocates memory
char * pgr_msg(const std::string &msg)
virtual const char * what() const
std::vector< pgr_vertex_color_rt > pgr_sequentialVertexColoring(G &graph)
Calls the main function defined in the C++ Header file.
#define pgassert(expr)
Uses the standard assert syntax.
void insert_edges(const T *edges, size_t count)
Inserts count edges of type T into the graph.
void do_pgr_sequentialVertexColoring(pgr_edge_t *data_edges, size_t total_edges, pgr_vertex_color_rt **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg)
Performs exception handling and converts the results to postgres.
The main file which calls the respective boost function.
An assert functionality that uses C++ throw().
std::vector< pgr_vertex_color_rt > sequentialVertexColoring(G &graph)
sequentialVertexColoring function
graph::Pgr_base_graph< BG, XY_vertex, Basic_edge > G
Extends std::exception and is the exception that we throw if an assert fails.