44 lines
962 B
C++
44 lines
962 B
C++
|
#ifndef idD3EDC396AA314474B3D909559FFC0247
|
||
|
#define idD3EDC396AA314474B3D909559FFC0247
|
||
|
|
||
|
#include "primitivetypes.hpp"
|
||
|
#include "components/tilestreamer.hpp"
|
||
|
#include <algorithm>
|
||
|
#include <vector>
|
||
|
|
||
|
namespace dk {
|
||
|
template <size_t D>
|
||
|
class LayerBase {
|
||
|
public:
|
||
|
typedef Vector<CoordinateScalarType, D> coords;
|
||
|
|
||
|
explicit LayerBase ( const coords& parSize );
|
||
|
virtual ~LayerBase ( void ) noexcept = default;
|
||
|
|
||
|
protected:
|
||
|
coords m_size;
|
||
|
};
|
||
|
|
||
|
template <typename T, size_t D>
|
||
|
class Layer : public LayerBase<D> {
|
||
|
public:
|
||
|
typedef typename LayerBase<D>::coords coords;
|
||
|
typedef TileStreamer<T, D> streamer_type;
|
||
|
|
||
|
Layer ( const Layer& ) = delete;
|
||
|
Layer ( Layer&& ) = default;
|
||
|
Layer ( const coords& parSize, streamer_type&& parStreamer );
|
||
|
virtual ~Layer ( void ) noexcept = default;
|
||
|
|
||
|
Layer& operator= ( const Layer& ) = delete;
|
||
|
|
||
|
private:
|
||
|
streamer_type m_streamer;
|
||
|
std::vector<T> m_tiles;
|
||
|
};
|
||
|
} //namespace dk
|
||
|
|
||
|
#include "implem/layer.inl"
|
||
|
|
||
|
#endif
|