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
40 template <
unsigned Size>
52 BID() : storage(NULL), offset(0)
57 return storage != NULL;
63 BID(
const BID& obj) : storage(obj.storage), offset(obj.offset)
66 template <
unsigned BlockSize>
68 : storage(obj.storage), offset(obj.offset)
71 template <
unsigned BlockSize>
81 return storage->get_allocator_id() != file::NO_ALLOCATOR;
100 BID() : storage(NULL), offset(0), size(0)
108 return (storage != NULL);
112 template <
unsigned BlockSize>
118 template <
unsigned BlockSize>
124 template <
unsigned BlockSize>
125 std::ostream& operator << (std::ostream& s, const BID<BlockSize>& bid)
130 std::ios
state(NULL);
133 s <<
"[" << bid.storage <<
"|";
135 s << bid.storage->get_allocator_id();
138 s <<
"]0x" << std::hex << std::setfill(
'0') << std::setw(8) << bid.offset <<
"/0x" << std::setw(8) << bid.size << std::dec;
144 template <
unsigned BlockSize>
161 #endif // !STXXL_MNG_BID_HEADER
stxxl::int64 offset
offset within the file of the block
Defines interface of file.
bool operator!=(const uint_pair &b) const
inequality checking operator
BIDArray(unsigned_type size)
#define STXXL_BEGIN_NAMESPACE
BID(file *s, stxxl::int64 o)
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
file * storage
pointer to the file of the block
stxxl::int64 offset
offset within the file of the block
BID(file *f, stxxl::int64 o, unsigned s)
bool operator==(const uint_pair &b) const
equality checking operator
#define STXXL_END_NAMESPACE
BID(const BID< BlockSize > &obj)