+ BlockList::const_iterator i = find_block(blocks.begin(), blocks.end(), block);
+ if(i==blocks.end())
+ throw key_error(&block);
+ return *i;
+}
+
+bool BlockAllocator::has_block(const Block &block) const
+{
+ return find_block(blocks.begin(), blocks.end(), block)!=blocks.end();
+}
+
+bool BlockAllocator::is_block_current(const Block &block) const
+{
+ return find_block(blocks.begin(), cur_blocks_end, block)!=cur_blocks_end;
+}
+
+BlockAllocator::BlockList::const_iterator BlockAllocator::find_block(const BlockList::const_iterator &begin, const BlockList::const_iterator &end, const Block &block) const
+{
+ BlockList::const_iterator i;
+ for(i=begin; (i!=end && &**i!=&block); ++i) ;
+ return i;