3 This file is part of R²C²
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBR2C2_BLOCKITER_H_
9 #define LIBR2C2_BLOCKITER_H_
18 An iterator for traversing blocks.
28 BlockIter(Block *, unsigned);
30 Block *block() const { return _block; }
31 unsigned entry() const { return _entry; }
32 TrackIter track_iter() const;
33 const Block::Endpoint &endpoint() const;
36 int get_exit(const Route *) const;
38 BlockIter next(const Route * = 0) const;
39 BlockIter reverse(const Route * = 0) const;
40 BlockIter flip() const;
42 Block &operator*() const;
43 Block *operator->() const { return _block; }
44 bool operator==(const BlockIter &) const;
45 bool operator!=(const BlockIter &other) const { return !(*this==other); }
46 operator bool() const { return _block!=0; }