namespace dk { namespace implem { template class data_fetcher { public: typedef typename BaseMapSource::coords coords; static void fetch ( std::vector& parOut, const coords& parFrom, const coords& parTo, std::size_t parCount, BaseMapSource& parMapSrc ) { parOut.resize(parCount); parMapSrc.fetch_raw(reinterpret_cast(parOut.data()), parFrom, parTo, sizeof(T) * parCount); } }; template class data_fetcher { public: typedef typename BaseMapSource::coords coords; static void fetch ( std::vector& parOut, const coords& parFrom, const coords& parTo, std::size_t parCount, BaseMapSource& parMapSrc ) { parOut.reserve(parCount); DK_ASSERT(false); //not implemented (void)parOut; (void)parFrom; (void)parTo; (void)parMapSrc; } }; } //namespace implem template template void BaseMapSource::fetch (std::vector& parOut, const coords& parFrom, const coords& parTo) { const auto tile_count = tile_volume(parFrom, parTo); const std::size_t casted_tile_count = static_cast(tile_count); DK_ASSERT(static_cast(casted_tile_count) == tile_count); parOut.reserve(casted_tile_count); parOut.clear(); implem::data_fetcher::fetch(parOut, parFrom, parTo, casted_tile_count, *this); } } //namespace dk