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