mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 06:03:45 +00:00
[routing] Documentation
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -14,8 +14,12 @@ namespace routing
|
|||||||
{
|
{
|
||||||
using LocalFileCheckerFn = std::function<bool(std::string const &)>;
|
using LocalFileCheckerFn = std::function<bool(std::string const &)>;
|
||||||
|
|
||||||
// Encapsulates generation of mwm names of absent regions needed for building the route between
|
/**
|
||||||
// |checkpoints|. For this purpose the new thread is used.
|
* @brief Generates a list of MWMs needed to build a route.
|
||||||
|
*
|
||||||
|
* The `AbsentRegionsFinder` class encapsulates generation of MWM names of absent regions needed
|
||||||
|
* for building the route between `checkpoints`. For this purpose a separate worker thread is used.
|
||||||
|
*/
|
||||||
class AbsentRegionsFinder
|
class AbsentRegionsFinder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -23,7 +27,11 @@ public:
|
|||||||
LocalFileCheckerFn const & localFileChecker,
|
LocalFileCheckerFn const & localFileChecker,
|
||||||
std::shared_ptr<NumMwmIds> numMwmIds, DataSource & dataSource);
|
std::shared_ptr<NumMwmIds> numMwmIds, DataSource & dataSource);
|
||||||
|
|
||||||
// Creates new thread |m_routerThread| and starts routing in it.
|
/**
|
||||||
|
* @brief Creates new thread `m_routerThread` and starts routing in it.
|
||||||
|
* @param checkpoints The checkpoints of the route (start, optional intermediate points, destination)
|
||||||
|
* @param delegate
|
||||||
|
*/
|
||||||
void GenerateAbsentRegions(Checkpoints const & checkpoints, RouterDelegate const & delegate);
|
void GenerateAbsentRegions(Checkpoints const & checkpoints, RouterDelegate const & delegate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -23,11 +23,15 @@
|
|||||||
namespace routing
|
namespace routing
|
||||||
{
|
{
|
||||||
|
|
||||||
/// Dispatches a route calculation on a worker thread
|
/**
|
||||||
|
* @brief The AsyncRouter class is a wrapper class to run routing routines in a different thread.
|
||||||
|
*
|
||||||
|
* It encapsulates an `IRouter` (or subclass) instance, set with `SetRouter()`, and runs it in a
|
||||||
|
* separate worker thread to calculate the route.
|
||||||
|
*/
|
||||||
class AsyncRouter final
|
class AsyncRouter final
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// AsyncRouter is a wrapper class to run routing routines in the different thread
|
|
||||||
AsyncRouter(PointCheckCallback const & pointCheckCallback);
|
AsyncRouter(PointCheckCallback const & pointCheckCallback);
|
||||||
~AsyncRouter();
|
~AsyncRouter();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user