#ifndef id263B7DAF9A1C40BB8517D5D328DF8A1B #define id263B7DAF9A1C40BB8517D5D328DF8A1B #include "primitivetypes.hpp" #include "implem/vector.hpp" #include #include #include // source_tag namespace dkh { class AsciiMapSource : public std::streambuf { public: typedef dk::Vector coords; typedef int MapTileType; typedef boost::iostreams::source_tag category; enum { MapDimensions = 2 }; AsciiMapSource ( void ) = delete; AsciiMapSource ( const AsciiMapSource& ) = default; AsciiMapSource ( AsciiMapSource&& parOther ) = delete; explicit AsciiMapSource ( const char* parFilename ); explicit AsciiMapSource ( const std::string& parFilename ); explicit AsciiMapSource ( std::istream& parData ); template AsciiMapSource ( I parDataFrom, I parDataTo ); ~AsciiMapSource ( void ) noexcept = default; const coords& mapSize ( void ) const noexcept { return m_mapSize; } private: void parse_map_data ( std::istream& parSrc ); std::vector m_wholedata; coords m_mapSize; }; } //namespace dkh #endif