1 #ifndef LIBR2C2_BLOCKITER_H_
2 #define LIBR2C2_BLOCKITER_H_
12 An iterator for traversing blocks.
22 BlockIter(Block *, unsigned);
24 Block *block() const { return _block; }
25 unsigned entry() const { return _entry; }
26 TrackIter track_iter() const;
27 const Block::Endpoint &endpoint() const;
30 int get_exit(const Route *) const;
32 BlockIter next(const Route * = 0) const;
33 BlockIter reverse(const Route * = 0) const;
34 BlockIter flip() const;
36 Block &operator*() const;
37 Block *operator->() const { return _block; }
38 bool operator==(const BlockIter &) const;
39 bool operator!=(const BlockIter &other) const { return !(*this==other); }
40 operator bool() const { return _block!=0; }