TPIE

2362a60
tpie::bbits::external_store< T, A, a, b, bs > Class Template Reference

Storage used for an external btree. More...

#include <tpie/btree/external_store.h>

Inherits tpie::bbits::external_store_base.

Classes

struct  internal
 
struct  internal_content
 
struct  internal_type
 
struct  leaf
 
struct  leaf_type
 

Public Types

typedef T value_type
 Type of value of items stored. More...
 
typedef A augment_type
 Type of augmentation stored. More...
 
typedef size_t size_type
 

Public Member Functions

 external_store (const std::string &path, bool=false)
 Construct a new empty btree storage. More...
 
 external_store (external_store &&other) noexcept=default
 
void move (internal_type src, size_t src_i, internal_type dst, size_t dst_i)
 
void move (leaf_type src, size_t src_i, leaf_type dst, size_t dst_i)
 
void set (leaf_type dst, size_t dst_i, T c)
 
void set (internal_type node, size_t i, internal_type c)
 
void set (internal_type node, size_t i, leaf_type c)
 
const T & get (leaf_type node, size_t i) const
 
size_t count (internal_type node) const
 
size_t count (leaf_type node) const
 
size_t count_child_leaf (internal_type node, size_t i) const
 
size_t count_child_internal (internal_type node, size_t i) const
 
void set_count (internal_type node, size_t i)
 
void set_count (leaf_type node, size_t i)
 
leaf_type create_leaf ()
 
leaf_type create (leaf_type)
 
internal_type create_internal ()
 
internal_type create (internal_type)
 
void destroy (internal_type node)
 
void destroy (leaf_type node)
 
void set_root (internal_type node)
 
void set_root (leaf_type node)
 
internal_type get_root_internal () const throw ()
 
leaf_type get_root_leaf () const throw ()
 
internal_type get_child_internal (internal_type node, size_t i) const
 
leaf_type get_child_leaf (internal_type node, size_t i) const
 
size_t index (leaf_type child, internal_type node) const
 
size_t index (internal_type child, internal_type node) const
 
void set_augment (blocks::block_handle child, internal_type node, augment_type augment)
 
void set_augment (leaf_type child, internal_type node, augment_type augment)
 
void set_augment (internal_type child, internal_type node, augment_type augment)
 
const augment_typeaugment (internal_type node, size_t i) const
 
size_t height () const throw ()
 
void set_height (size_t height) throw ()
 
size_t size () const throw ()
 
void set_size (size_t size) throw ()
 
void flush ()
 
void finalize_build ()
 
void set_metadata (const std::string &)
 
std::string get_metadata ()
 

Static Public Member Functions

static constexpr memory_size_type cacheSize ()
 
static constexpr memory_size_type blockSize ()
 
static constexpr size_t min_internal_size ()
 
static constexpr size_t max_internal_size ()
 
static constexpr size_t min_leaf_size ()
 
static constexpr size_t max_leaf_size ()
 

Public Attributes

std::shared_ptr
< blocks::block_collection_cache
m_collection
 

Protected Attributes

blocks::block_handle m_root
 
std::string m_path
 
size_t m_height
 
size_t m_size
 
bool m_moved
 

Friends

template<typename >
class btree_node
 
template<typename >
class btree_iterator
 
template<typename , typename >
class bbits::tree_state
 
template<typename , typename >
class bbits::tree
 
template<typename , typename >
class bbits::builder
 

Detailed Description

template<typename T, typename A, std::size_t a, std::size_t b, std::size_t bs>
class tpie::bbits::external_store< T, A, a, b, bs >

Storage used for an external btree.

Note that a user of a btree should not call the store directly.

Template Parameters
Tthe type of value stored
Athe type of augmentation

Definition at line 214 of file base.h.

Member Typedef Documentation

template<typename T , typename A , std::size_t a, std::size_t b, std::size_t bs>
typedef A tpie::bbits::external_store< T, A, a, b, bs >::augment_type

Type of augmentation stored.

Definition at line 57 of file external_store.h.

template<typename T , typename A , std::size_t a, std::size_t b, std::size_t bs>
typedef T tpie::bbits::external_store< T, A, a, b, bs >::value_type

Type of value of items stored.

Definition at line 52 of file external_store.h.

Constructor & Destructor Documentation

template<typename T , typename A , std::size_t a, std::size_t b, std::size_t bs>
tpie::bbits::external_store< T, A, a, b, bs >::external_store ( const std::string &  path,
bool  = false 
)
inlineexplicit

Construct a new empty btree storage.

Definition at line 114 of file external_store.h.

115  : external_store_base(path)
116  {
117  m_collection = std::make_shared<blocks::block_collection_cache>(
118  path, blockSize(), cacheSize(), true);
119  }
external_store_base(const std::string &path)
Construct a new empty btree storage.

The documentation for this class was generated from the following files: