1 /* 2 database-dummy.h 3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com> 4 */ 5 6 /* 7 This file is part of Freeminer. 8 9 Freeminer is free software: you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation, either version 3 of the License, or 12 (at your option) any later version. 13 14 Freeminer is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with Freeminer. If not, see <http://www.gnu.org/licenses/>. 21 */ 22 23 #ifndef DATABASE_DUMMY_HEADER 24 #define DATABASE_DUMMY_HEADER 25 26 #include <map> 27 #include <string> 28 #include "database.h" 29 #include "irrlichttypes.h" 30 #include "util/lock.h" 31 32 class ServerMap; 33 34 class Database_Dummy : public Database 35 { 36 public: 37 Database_Dummy(ServerMap *map); 38 virtual void beginSave(); 39 virtual void endSave(); 40 virtual bool saveBlock(v3s16 blockpos, std::string &data); 41 virtual std::string loadBlock(v3s16 blockpos); 42 virtual void listAllLoadableBlocks(std::list<v3s16> &dst); 43 virtual int Initialized(void); 44 ~Database_Dummy(); 45 private: 46 ServerMap *srvmap; 47 shared_map<std::string, std::string> m_database; 48 }; 49 #endif 50