46 size_t restrictions_size,
48 int64_t *start_vidsArr,
49 size_t size_start_vidsArr,
52 size_t size_end_vidsArr,
61 std::ostringstream log;
62 std::ostringstream err;
63 std::ostringstream notice;
71 std::vector<pgrouting::trsp::Rule> ruleList;
72 for (
size_t i = 0; i < restrictions_size; ++i) {
80 sources(start_vidsArr, start_vidsArr + size_start_vidsArr);
81 std::vector< int64_t >
82 targets(end_vidsArr, end_vidsArr + size_end_vidsArr);
87 std::sort(sources.begin(), sources.end());
89 std::unique(sources.begin(), sources.end()),
92 std::sort(targets.begin(), targets.end());
94 std::unique(targets.begin(), targets.end()),
114 (*return_tuples) = NULL;
119 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
123 *log_msg = log.str().empty()?
126 *notice_msg = notice.str().empty()?
132 (*return_tuples) =
pgr_free(*return_tuples);
134 err << except.
what();
135 *err_msg =
pgr_msg(err.str().c_str());
136 *log_msg =
pgr_msg(log.str().c_str());
137 }
catch (std::exception &except) {
138 (*return_tuples) =
pgr_free(*return_tuples);
140 err << except.what();
141 *err_msg =
pgr_msg(err.str().c_str());
142 *log_msg =
pgr_msg(log.str().c_str());
144 (*return_tuples) =
pgr_free(*return_tuples);
146 err <<
"Caught unknown exception!";
147 *err_msg =
pgr_msg(err.str().c_str());
148 *log_msg =
pgr_msg(log.str().c_str());