26 lines
666 B
C++
26 lines
666 B
C++
|
#pragma once
|
||
|
|
||
|
#include "vector.hpp"
|
||
|
#include <boost/iterator/iterator_facade.hpp>
|
||
|
#include <ciso646>
|
||
|
|
||
|
namespace curry {
|
||
|
typedef int Tile;
|
||
|
class WorldViewport;
|
||
|
|
||
|
class TileIterator : public boost::iterator_facade<TileIterator, Tile, boost::bidirectional_traversal_tag> {
|
||
|
typedef boost::iterator_facade<TileIterator, Tile, boost::bidirectional_traversal_tag> base_class;
|
||
|
friend class boost::iterator_core_access;
|
||
|
public:
|
||
|
TileIterator (WorldViewport* parViewport, bool parEnd);
|
||
|
|
||
|
private:
|
||
|
Tile& dereference() const;
|
||
|
void increment();
|
||
|
bool equal (const TileIterator& parOther) const;
|
||
|
|
||
|
WorldViewport* m_viewport;
|
||
|
vec2i m_index;
|
||
|
};
|
||
|
} //namespace curry
|