From 34031aab1b7f4e20c22a7e37b4e266e420811634 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Fri, 10 Apr 2015 12:35:24 +0200 Subject: [PATCH] Add further documentation to ExtractorCallbacks --- extractor/extractor_callbacks.cpp | 15 ++++++++++----- extractor/extractor_callbacks.hpp | 7 +++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/extractor/extractor_callbacks.cpp b/extractor/extractor_callbacks.cpp index fba9206af..6ae9ff437 100644 --- a/extractor/extractor_callbacks.cpp +++ b/extractor/extractor_callbacks.cpp @@ -47,7 +47,12 @@ ExtractorCallbacks::ExtractorCallbacks(ExtractionContainers &extraction_containe { } -/** warning: caller needs to take care of synchronization! */ +/** + * Takes the node position from osmium and the filtered properties from the lua + * profile and saves them to external memory. + * + * warning: caller needs to take care of synchronization! + */ void ExtractorCallbacks::ProcessNode(const osmium::Node &input_node, const ExtractionNode &result_node) { @@ -73,11 +78,11 @@ void ExtractorCallbacks::ProcessRestriction( } } /** - * This function takes the geometry contained in the ```input_way``` and the tags - * computed by the lua profile inside ```parsed_way``` and computes all edge segments. + * Takes the geometry contained in the ```input_way``` and the tags computed + * by the lua profile inside ```parsed_way``` and computes all edge segments. * - * Depending on the forward/backwards weights the edges are split into forward and backward - * edges. + * Depending on the forward/backwards weights the edges are split into forward + * and backward edges. * * warning: caller needs to take care of synchronization! */ diff --git a/extractor/extractor_callbacks.hpp b/extractor/extractor_callbacks.hpp index 8eab0182b..79225f497 100644 --- a/extractor/extractor_callbacks.hpp +++ b/extractor/extractor_callbacks.hpp @@ -43,6 +43,13 @@ class ExtractionContainers; struct InputRestrictionContainer; struct ExtractionNode; +/** + * This class is uses by the extractor with the results of the + * osmium based parsing and the customization through the lua profile. + * + * It mediates between the multi-threaded extraction process and the external memory containers. + * Thus the synchronization is handled inside of the extractor. + */ class ExtractorCallbacks { private: