Add redis database backend

This commit is contained in:
Sfan5
2014-04-26 15:01:35 +02:00
parent 22d3e401f8
commit 2553e44e8d
7 changed files with 223 additions and 2 deletions

View File

@ -17,6 +17,9 @@
#if USE_LEVELDB
#include "db-leveldb.h"
#endif
#if USE_REDIS
#include "db-redis.h"
#endif
using namespace std;
@ -298,6 +301,10 @@ void TileGenerator::openDb(const std::string &input)
#if USE_LEVELDB
else if(m_backend == "leveldb")
m_db = new DBLevelDB(input);
#endif
#if USE_REDIS
else if(m_backend == "redis")
m_db = new DBRedis(input);
#endif
else
throw std::runtime_error(((std::string) "Unknown map backend: ") + m_backend);