DoorKeeper/include/doorkeeper/components/tilemapdata.hpp

34 lines
936 B
C++

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