23 #ifndef OM_HGUARD_CHERT_BTREEBASE_H 24 #define OM_HGUARD_CHERT_BTREEBASE_H 49 bool read(
const std::string &
name,
char ch,
bool read_bitmap,
50 std::string &err_msg);
87 const std::string &tablename,
89 const std::string * changes_tail);
uint4 bit_map_low
byte offset into the bit map below which there are no free blocks
bool get_sequential() const
bool get_have_fakeroot() const
void set_level(uint4 level_)
void swap(ChertTable_base &other)
~ChertTable_base()
Destructor - frees resources.
void calculate_last_block()
bool block_free_now(uint4 n) const
Types used by chert backend and the Btree manager.
chert_tablesize_t get_item_count() const
void set_have_fakeroot(bool have_fakeroot_)
chert_tablesize_t item_count
void set_sequential(bool sequential_)
uint4 get_block_size() const
unsigned long long chert_tablesize_t
A type used to store the number of entries in a table.
void set_root(uint4 root_)
bool find_changed_block(uint4 *n) const
Find the first changed block at or after position *n.
bool read(const std::string &name, char ch, bool read_bitmap, std::string &err_msg)
Read values from a base file.
void set_item_count(chert_tablesize_t item_count_)
void set_block_size(uint4 block_size_)
uint4 get_revision() const
uint4 get_bit_map_size() const
void operator=(const ChertTable_base &other)
private assignment operator - you probably want swap() instead
void write_to_file(const std::string &filename, char base_letter, const std::string &tablename, int changes_fd, const std::string *changes_tail)
Write the btree base file to disk.
bool block_free_at_start(uint4 n) const
true iff block n was free at the start of the transaction on the B-tree.
uint8_t * bit_map
the current state of the bit map of blocks
uint4 get_last_block() const
uint8_t * bit_map0
the initial state of the bit map of blocks: 1 means in use, 0 means free
ChertTable_base()
Construct an object with all zero fields.
void set_revision(uint4 revision_)