60 std::ostringstream log;
61 std::ostringstream notice;
62 std::ostringstream err;
80 std::vector<pgr_ltdtree_rt> results;
82 results = fn_LTDTree.
pgr_ltdtree(digraph, root_vertex);
87 auto count = results.size();
90 (*return_tuples) = NULL;
92 notice <<
"No result found";
93 *log_msg = log.str().empty()?
96 *notice_msg = notice.str().empty()?
101 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
102 for (
size_t i = 0; i < count; i++) {
103 *((*return_tuples) + i) = results[i];
105 (*return_count) = count;
108 *log_msg = log.str().empty()?
111 *notice_msg = notice.str().empty()?
115 (*return_tuples) =
pgr_free(*return_tuples);
117 err << except.
what();
118 *err_msg =
pgr_msg(err.str().c_str());
119 *log_msg =
pgr_msg(log.str().c_str());
120 }
catch (std::exception &except) {
121 (*return_tuples) =
pgr_free(*return_tuples);
123 err << except.what();
124 *err_msg =
pgr_msg(err.str().c_str());
125 *log_msg =
pgr_msg(log.str().c_str());
127 (*return_tuples) =
pgr_free(*return_tuples);
129 err <<
"Caught unknown exception!";
130 *err_msg =
pgr_msg(err.str().c_str());
131 *log_msg =
pgr_msg(log.str().c_str());