further implementation of data facades

This commit is contained in:
Dennis Luxen
2013-09-19 18:55:49 +02:00
parent 370f4f6257
commit d5c91b9bda
3 changed files with 21 additions and 0 deletions
+11
View File
@@ -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 <string>
@@ -34,6 +35,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
template<class EdgeDataT>
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
@@ -93,6 +93,11 @@ public:
const unsigned name_id,
std::string & result
) const { return; };
std::string GetTimestamp() const {
return "";
};
};
#endif // INTERNAL_DATA_FACADE
+5
View File
@@ -94,6 +94,11 @@ public:
const unsigned name_id,
std::string & result
) const { return; };
std::string GetTimestamp() const {
return "";
};
};
#endif // SHARED_DATA_FACADE