/* Copyright 2015, Michele Santullo * This file is part of DoorKeeper. * * DoorKeeper is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * DoorKeeper is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with DoorKeeper. If not, see . */ #ifndef idA52FEA0859494D3FBDF8ED5565091C59 #define idA52FEA0859494D3FBDF8ED5565091C59 #include "doorkeeper/components/tyler.hpp" #include "doorkeeper/components/basemapsource.hpp" #include "doorkeeper/helpers/typename.hpp" #include "doorkeeper/components/exception.hpp" #include #include #include #include #include #include #include namespace dkh { template using PushLayerMapType = std::map::*)(dk::BaseMapSource*,int)>; template struct MapLoaderPool { typedef std::unique_ptr> BaseMapSourceUPtr; typedef std::map PoolMapType; enum { dimensions = D }; typedef C opener_type; PoolMapType pool; C opener; dk::BaseMapSource* operator() ( const std::string& parName ); }; class UnknownLayerTemplateException : public dk::DoorKeeperException { }; template dk::Tyler call_map_load ( M& parFileOpener, const std::string& parOpen, const PushLayerMapType& parPusher ); template dk::Tyler call_map_load ( dk::Tyler& parTyler, M& parFileOpener, const std::string& parOpen, const PushLayerMapType& parPusher ); template dk::Tyler map_load ( C& parFileOpener, const std::string& parOpen, const PushLayerMapType& parPusher ); template dk::Tyler& map_load ( dk::Tyler& parTyler, C& parFileOpener, const std::string& parOpen, const PushLayerMapType& parPusher ); namespace implem { template void call_push_layer ( dk::Tyler& parTyler, const PushLayerMapType& parPusher, dk::BaseMapSource* parReader, int parIndex ); } //namespace implem } //namespace dkh #include "doorkeeper/implem/maploader.inl" #endif