16 #ifndef STXXL_MNG_BID_HEADER
17 #define STXXL_MNG_BID_HEADER
27 #ifndef STXXL_VERBOSE_BLOCK_LIFE_CYCLE
28 #define STXXL_VERBOSE_BLOCK_LIFE_CYCLE STXXL_VERBOSE2
30 #define FMT_BID(_bid_) "[" << (_bid_).storage->get_allocator_id() << "]0x" << std::hex << std::setfill('0') << std::setw(8) << (_bid_).offset << "/0x" << std::setw(8) << (_bid_).size
41 template <
unsigned SIZE>
53 BID() : storage(NULL), offset(0)
58 return storage != NULL;
64 BID(
const BID& obj) : storage(obj.storage), offset(obj.offset)
67 template <
unsigned BlockSize>
71 template <
unsigned BlockSize>
81 return storage->get_allocator_id() != file::NO_ALLOCATOR;
101 BID() : storage(NULL), offset(0), size(0)
109 return (storage != NULL);
113 template <
unsigned blk_sz>
119 template <
unsigned blk_sz>
125 template <
unsigned blk_sz>
126 std::ostream& operator << (std::ostream& s, const BID<blk_sz>& bid)
131 std::ios
state(NULL);
134 s <<
"[" << bid.storage <<
"|";
136 s << bid.storage->get_allocator_id();
139 s <<
"]0x" << std::hex << std::setfill(
'0') << std::setw(8) << bid.offset <<
"/0x" << std::setw(8) << bid.size << std::dec;
145 template <
unsigned BLK_SIZE>
162 #endif // !STXXL_MNG_BID_HEADER
stxxl::int64 offset
offset within the file of the block
BID(file *s, stxxl::int64 o)
BIDArray(unsigned_type size)
Defines interface of file.
bool operator!=(const uint_pair &b) const
inequality checking operator
file * storage
pointer to the file of the block
#define STXXL_BEGIN_NAMESPACE
unsigned size
size of the block in bytes
file * storage
pointer to the file of the block
Simpler non-growing vector without initialization.
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
stxxl::int64 offset
offset within the file of the block
BID(const BID< BlockSize > &obj)
BID(file *f, stxxl::int64 o, unsigned s)
bool operator==(const uint_pair &b) const
equality checking operator
#define STXXL_END_NAMESPACE