33 lines
931 B
C++
33 lines
931 B
C++
|
#ifndef id3CAE7A32F0C3428EA125F91D261C0029
|
||
|
#define id3CAE7A32F0C3428EA125F91D261C0029
|
||
|
|
||
|
#include "primitivetypes.hpp"
|
||
|
#include "implem/vector.hpp"
|
||
|
#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
|
||
|
|
||
|
#include "implem/mapstreambase.inl"
|
||
|
|
||
|
#endif
|