DoorKeeper/include/doorkeeper/helpers/maploader.hpp
King_DuckZ a82e8c16f6 Helper recursive map loader.
Recursion not tested since the file format is not ready yet, sorry.
2015-05-28 00:20:40 +02:00

45 lines
1.3 KiB
C++

#ifndef idA52FEA0859494D3FBDF8ED5565091C59
#define idA52FEA0859494D3FBDF8ED5565091C59
#include "doorkeeper/components/tyler.hpp"
#include "doorkeeper/components/basemapsource.hpp"
#include <cstdint>
#include <utility>
#include <string>
#include <memory>
#include <map>
#include <stack>
#include <ciso646>
namespace dkh {
template <typename T, uint32_t D, typename C>
struct MapLoaderPool {
typedef std::unique_ptr<dk::BaseMapSource<T, D>> BaseMapSourceUPtr;
typedef std::map<std::string, BaseMapSourceUPtr> PoolMapType;
enum { dimensions = D };
typedef C opener_type;
typedef T tile_type;
PoolMapType pool;
C opener;
dk::BaseMapSource<T, D>* operator() ( const std::string& parName );
};
template <typename M>
dk::Tyler<M::dimensions> call_map_load ( M& parFileOpener, const std::string& parOpen );
template <typename M>
dk::Tyler<M::dimensions> call_map_load ( dk::Tyler<M::dimensions>& parTyler, M& parFileOpener, const std::string& parOpen );
template <typename T, uint32_t D, typename C>
dk::Tyler<D> map_load ( C& parFileOpener, const std::string& parOpen );
template <typename T, uint32_t D, typename C>
dk::Tyler<D>& map_load ( dk::Tyler<D>& parTyler, C& parFileOpener, const std::string& parOpen );
} //namespace dkh
#include "doorkeeper/implem/maploader.inl"
#endif