/* Copyright 2015, Michele Santullo * This file is part of DoorKeeper. * * DoorKeeper is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * DoorKeeper is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with DoorKeeper. If not, see . */ #ifndef id0ADBCC15BA574485BF3267254090D99B #define id0ADBCC15BA574485BF3267254090D99B #include "doorkeeper/primitivetypes.hpp" #include "doorkeeper/components/tileiterator.hpp" #include "doorkeeper/components/layer.hpp" #include "doorkeeper/components/tilecoords.hpp" #include namespace dk { template class Tyler; template class Layer; template class Viewport { public: typedef Vector coords; Viewport ( const Viewport& parOther ) = default; explicit Viewport ( Tyler& parTyler ); Viewport ( Tyler& parTyler, const coords& parSize, const coords& parPos ); ~Viewport ( void ) noexcept = default; Viewport& operator= ( const Viewport& ) = default; void setFrom ( const coords& parFrom ); coords size ( void ) const; template typename Layer::iterator begin ( Layer& parLayer ) const; template typename Layer::iterator end ( Layer& parLayer ) const; template inline typename Layer::const_iterator begin ( const Layer& parLayer ) const a_always_inline; template inline typename Layer::const_iterator end ( const Layer& parLayer ) const a_always_inline; template typename Layer::const_iterator cbegin ( const Layer& parLayer ) const; template typename Layer::const_iterator cend ( const Layer& parLayer ) const; private: TileCoords m_view; Tyler& m_tyler; }; } //namespace dk #include "doorkeeper/implem/viewport.inl" #endif