[array] add array_t
This commit is contained in:
@ -142,9 +142,13 @@ namespace persistent_data {
|
||||
tm_ptr tm_;
|
||||
bool destroy_;
|
||||
unsigned entries_per_block_; // FIXME: initialise
|
||||
btree<1, array_block_traits<ValueTraits> > block_tree_;
|
||||
|
||||
typedef array_block_traits<ValueTraits> btree_traits;
|
||||
btree<1, btree_traits> block_tree_;
|
||||
typename ValueTraits::ref_counter rc_;
|
||||
};
|
||||
|
||||
// FIXME: we need an array checker
|
||||
}
|
||||
|
||||
#include "array.tcc"
|
||||
|
@ -71,8 +71,8 @@ array<ValueTraits>::array(typename persistent_data::transaction_manager::ptr tm,
|
||||
value_type const &default_value)
|
||||
: tm_(tm),
|
||||
destroy_(false),
|
||||
block_tree_(tm, array_block_traits<ValueTraits>()),
|
||||
entries_per_block_(calc_max_entries(sizeof(value_type), MD_BLOCK_SIZE)),
|
||||
block_tree_(tm, typename btree_traits::ref_counter()),
|
||||
rc_(rc)
|
||||
{
|
||||
}
|
||||
@ -83,8 +83,8 @@ array<ValueTraits>::array(typename persistent_data::transaction_manager::ptr tm,
|
||||
block_address root)
|
||||
: tm_(tm),
|
||||
destroy_(false),
|
||||
block_tree_(tm, root, array_block_traits<ValueTraits>()),
|
||||
entries_per_block_(calc_max_entries(sizeof(value_type), MD_BLOCK_SIZE)),
|
||||
block_tree_(tm, root, typename btree_traits::ref_counter()),
|
||||
rc_(rc)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user