From d5c91b9bda7ed12fd616cea120e88fc7e6e3e013 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Thu, 19 Sep 2013 18:55:49 +0200 Subject: [PATCH] further implementation of data facades --- Server/DataStructures/BaseDataFacade.h | 11 +++++++++++ Server/DataStructures/InternalDataFacade.h | 5 +++++ Server/DataStructures/SharedDataFacade.h | 5 +++++ 3 files changed, 21 insertions(+) diff --git a/Server/DataStructures/BaseDataFacade.h b/Server/DataStructures/BaseDataFacade.h index 53302b5be..b3f1aee97 100644 --- a/Server/DataStructures/BaseDataFacade.h +++ b/Server/DataStructures/BaseDataFacade.h @@ -27,6 +27,7 @@ or see http://www.gnu.org/licenses/agpl.txt. #include "../../DataStructures/PhantomNodes.h" #include "../../DataStructures/TurnInstructions.h" #include "../../Util/OSRMException.h" +#include "../../Util/StringUtil.h" #include "../../typedefs.h" #include @@ -34,6 +35,7 @@ or see http://www.gnu.org/licenses/agpl.txt. template class BaseDataFacade { public: + typedef EdgeDataT EdgeData; BaseDataFacade() { } virtual ~BaseDataFacade() { } @@ -92,10 +94,19 @@ public: virtual unsigned GetCheckSum() const = 0; virtual unsigned GetNameIndexFromEdgeID(const unsigned id) const = 0; + virtual void GetName( const unsigned name_id, std::string & result ) const = 0; + + std::string GetEscapedNameForNameID(const unsigned name_id) const { + std::string temporary_string; + GetName(name_id, temporary_string); + return HTMLEntitize(temporary_string); + } + + virtual std::string GetTimestamp() const = 0; }; #endif // QUERY_DATA_FACADE_H diff --git a/Server/DataStructures/InternalDataFacade.h b/Server/DataStructures/InternalDataFacade.h index fd006bc5b..e4fc77525 100644 --- a/Server/DataStructures/InternalDataFacade.h +++ b/Server/DataStructures/InternalDataFacade.h @@ -93,6 +93,11 @@ public: const unsigned name_id, std::string & result ) const { return; }; + + std::string GetTimestamp() const { + return ""; + }; + }; #endif // INTERNAL_DATA_FACADE diff --git a/Server/DataStructures/SharedDataFacade.h b/Server/DataStructures/SharedDataFacade.h index fcdc15908..34700bca5 100644 --- a/Server/DataStructures/SharedDataFacade.h +++ b/Server/DataStructures/SharedDataFacade.h @@ -94,6 +94,11 @@ public: const unsigned name_id, std::string & result ) const { return; }; + + std::string GetTimestamp() const { + return ""; + }; + }; #endif // SHARED_DATA_FACADE