24 #ifndef _TPIE_BLOCKS_BLOCK_COLLECTION_CACHE_H
25 #define _TPIE_BLOCKS_BLOCK_COLLECTION_CACHE_H
27 #include <tpie/tpie_export.h>
31 #include <tpie/blocks/block.h>
32 #include <tpie/blocks/block_collection.h>
46 struct position_comparator {
48 return a.position < b.position;
52 typedef std::list<block_handle> block_list_t;
54 struct block_information_t {
55 block_information_t() {}
57 block_information_t(
block * pointer, block_list_t::iterator iterator,
bool dirty)
64 block_list_t::iterator iterator;
68 typedef std::map<block_handle, block_information_t, position_comparator> block_map_t;
77 block_collection_cache(std::string fileName, memory_size_type blockSize, memory_size_type maxSize,
bool writeable);
101 void used(block_information_t& item);
120 block_list_t m_blockList;
121 block_map_t m_blockMap;
122 memory_size_type m_curSize;
123 memory_size_type m_maxSize;
124 memory_size_type m_blockSize;
131 #endif // _TPIE_BLOCKS_BLOCK_COLLECTION_CACHE_H