King_DuckZ
701366bf86
This fixes the build on 64-bit machines, where size_t and uint32_t from vector.hpp would mismatch.
33 lines
980 B
C++
33 lines
980 B
C++
#ifndef id3CAE7A32F0C3428EA125F91D261C0029
|
|
#define id3CAE7A32F0C3428EA125F91D261C0029
|
|
|
|
#include "doorkeeper/primitivetypes.hpp"
|
|
#include "doorkeeper/implem/vector.hpp"
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
namespace dk {
|
|
template <uint32_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
|
|
|
|
#include "doorkeeper/implem/mapstreambase.inl"
|
|
|
|
#endif
|