2014-12-29 15:17:59 +00:00
|
|
|
#ifndef id8F5106DFABC14263ADF235C56E434207
|
|
|
|
#define id8F5106DFABC14263ADF235C56E434207
|
|
|
|
|
2015-01-06 15:38:52 +00:00
|
|
|
#include "doorkeeper/primitivetypes.hpp"
|
|
|
|
#include "doorkeeper/implem/compatibility.h"
|
|
|
|
#include "doorkeeper/implem/vector.hpp"
|
|
|
|
#include "doorkeeper/implem/helpers.hpp"
|
|
|
|
#include "doorkeeper/mapreaders/mapstreambase.hpp"
|
2014-12-29 15:17:59 +00:00
|
|
|
#include <cstddef>
|
|
|
|
#include <iterator>
|
2015-01-05 17:01:28 +00:00
|
|
|
#include <memory>
|
|
|
|
#include <algorithm>
|
2014-12-29 15:17:59 +00:00
|
|
|
|
|
|
|
namespace dk {
|
|
|
|
template <typename T, std::size_t D>
|
|
|
|
class TileMapData {
|
|
|
|
public:
|
|
|
|
typedef Vector<CoordinateScalarType, D> coords;
|
|
|
|
|
|
|
|
TileMapData ( void ) = delete;
|
2015-01-05 17:01:28 +00:00
|
|
|
explicit TileMapData ( std::unique_ptr<MapStreamBase<D>>&& parStream );
|
2014-12-29 15:17:59 +00:00
|
|
|
~TileMapData ( void ) noexcept = default;
|
|
|
|
|
|
|
|
void fetch ( std::vector<T>& parOut, const coords& parFrom, const coords& parTo );
|
|
|
|
const coords& mapSize ( void ) const;
|
|
|
|
|
|
|
|
private:
|
2015-01-05 17:01:28 +00:00
|
|
|
const std::unique_ptr<MapStreamBase<D>> m_mapstream;
|
2014-12-29 15:17:59 +00:00
|
|
|
};
|
|
|
|
} //namespace dk
|
|
|
|
|
2015-01-06 15:38:52 +00:00
|
|
|
#include "doorkeeper/implem/tilemapdata.inl"
|
2014-12-29 15:17:59 +00:00
|
|
|
|
|
|
|
#endif
|