From 8b8e0eb9ef33e06d26b1c0b5088d724b823e6d2a Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 18 May 2011 11:52:53 +0000 Subject: [PATCH] Prepare RoutePlugin for several instantiations with different metrics --- Plugins/RoutePlugin.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Plugins/RoutePlugin.h b/Plugins/RoutePlugin.h index c0982b474..1ed0cfe02 100644 --- a/Plugins/RoutePlugin.h +++ b/Plugins/RoutePlugin.h @@ -45,7 +45,7 @@ typedef StaticGraph::InputEdge InputEdge; class RoutePlugin : public BasePlugin { public: - RoutePlugin(std::string hsgrPath, std::string ramIndexPath, std::string fileIndexPath, std::string nodesPath, std::string namesPath) { + RoutePlugin(std::string hsgrPath, std::string ramIndexPath, std::string fileIndexPath, std::string nodesPath, std::string namesPath, std::string psd = "route") { //Init nearest neighbor data structure nodeHelpDesk = new NodeInformationHelpDesk(ramIndexPath.c_str(), fileIndexPath.c_str()); ifstream nodesInStream(nodesPath.c_str(), ios::binary); @@ -80,6 +80,7 @@ public: descriptorTable.Set("", 0); //default descriptor descriptorTable.Set("kml", 0); descriptorTable.Set("json", 1); + pluginDescriptorString = psd; } ~RoutePlugin() { delete names; @@ -88,7 +89,7 @@ public: delete nodeHelpDesk; } - std::string GetDescriptor() { return std::string("route"); } + std::string GetDescriptor() { return pluginDescriptorString; } std::string GetVersionString() { return std::string("0.3 (DL)"); } void HandleRequest(RouteParameters routeParameters, http::Reply& reply) { //check number of parameters @@ -216,6 +217,7 @@ private: std::vector * names; StaticGraph * graph; HashTable descriptorTable; + std::string pluginDescriptorString; };