mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 14:13: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 &)>;
|
||||
|
||||
// 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
|
||||
{
|
||||
public:
|
||||
@@ -23,7 +27,11 @@ public:
|
||||
LocalFileCheckerFn const & localFileChecker,
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,11 +23,15 @@
|
||||
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
|
||||
{
|
||||
public:
|
||||
/// AsyncRouter is a wrapper class to run routing routines in the different thread
|
||||
AsyncRouter(PointCheckCallback const & pointCheckCallback);
|
||||
~AsyncRouter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user