2015-01-05 17:01:28 +00:00
|
|
|
#ifndef id3CAE7A32F0C3428EA125F91D261C0029
|
|
|
|
#define id3CAE7A32F0C3428EA125F91D261C0029
|
|
|
|
|
2015-01-06 15:38:52 +00:00
|
|
|
#include "doorkeeper/primitivetypes.hpp"
|
|
|
|
#include "doorkeeper/implem/vector.hpp"
|
2015-01-05 17:01:28 +00:00
|
|
|
#include <cstddef>
|
|
|
|
|
|
|
|
namespace dk {
|
|
|
|
template <std::size_t D>
|
|
|
|
class MapStreamBase {
|
|
|
|
public:
|
|
|
|
typedef Vector<CoordinateScalarType, D> coords;
|
|
|
|
|
|
|
|
MapStreamBase ( void ) = delete;
|
|
|
|
explicit MapStreamBase ( const coords& parMapSize );
|
|
|
|
virtual ~MapStreamBase ( void ) noexcept = default;
|
|
|
|
|
|
|
|
virtual bool isReadable ( void ) const = 0;
|
|
|
|
virtual bool isWriteable ( void ) const = 0;
|
|
|
|
|
|
|
|
const coords& mapSize ( void ) const noexcept { return m_mapSize; }
|
|
|
|
void read ( char* parOut, std::size_t parOutSize, const coords& parFrom, const coords& parTo );
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual std::size_t dataBlockRequested ( char* parOut, std::size_t parOutSize, const coords& parFrom, const coords& parTo ) = 0;
|
|
|
|
const coords m_mapSize;
|
|
|
|
};
|
|
|
|
} //namespace dk
|
|
|
|
|
2015-01-06 15:38:52 +00:00
|
|
|
#include "doorkeeper/implem/mapstreambase.inl"
|
2015-01-05 17:01:28 +00:00
|
|
|
|
|
|
|
#endif
|