King_DuckZ
9086de8dae
The iterator is not included anywhere yet so it's completely untested. Next step is to define the relationship between views and layers, so iterators can be put into the class that will be responsible to spawn them.
41 lines
1 KiB
C++
41 lines
1 KiB
C++
#ifndef id6FB3FC97331449038D42AAAB4C01ABA1
|
|
#define id6FB3FC97331449038D42AAAB4C01ABA1
|
|
|
|
#include "components/layer.hpp"
|
|
#include <vector>
|
|
#include <cassert>
|
|
#include <ciso646>
|
|
#include <memory>
|
|
|
|
namespace dk {
|
|
template <size_t D>
|
|
class Viewport;
|
|
|
|
template <size_t D>
|
|
class Tyler {
|
|
typedef std::unique_ptr<LayerBase<D>> LayerPtr;
|
|
typedef std::vector<LayerPtr> LayerList;
|
|
public:
|
|
typedef typename LayerBase<D>::coords coords;
|
|
|
|
Tyler ( void ) = delete;
|
|
Tyler ( const coords& parSize, const coords& parTileSize );
|
|
~Tyler ( void ) noexcept = default;
|
|
|
|
typename coords::value_type tiles_count ( void ) const;
|
|
const coords& map_size ( void ) const { return m_size; }
|
|
template <typename T>
|
|
size_t push_layer ( typename Layer<T, D>::streamer_type&& parStreamer );
|
|
template <typename T>
|
|
size_t push_layer ( typename Layer<T, D>::streamer_type&& parStreamer, const coords& parSubdiv );
|
|
|
|
private:
|
|
const coords m_size;
|
|
const coords m_tilesize;
|
|
LayerList m_layers;
|
|
};
|
|
} //namespace dk
|
|
|
|
#include "implem/tyler.inl"
|
|
|
|
#endif
|