9#ifndef PSTSDK_NDB_DATABASE_IFACE_H
10#define PSTSDK_NDB_DATABASE_IFACE_H
63template<
typename K,
typename V>
68template<
typename K,
typename V>
73template<
typename K,
typename V>
78template<
typename K,
typename V>
115class db_context :
public std::enable_shared_from_this<db_context>
422 std::shared_ptr<extended_block> create_extended_block(std::shared_ptr<extended_block>& pblock) {
return create_extended_block(shared_from_this(), pblock); }
423 std::shared_ptr<extended_block> create_extended_block(
size_t size) {
return create_extended_block(shared_from_this(), size); }
424 virtual std::shared_ptr<external_block> create_external_block(
const shared_db_ptr& parent,
size_t size) = 0;
425 virtual std::shared_ptr<extended_block> create_extended_block(
const shared_db_ptr& parent, std::shared_ptr<external_block>& pblock) = 0;
426 virtual std::shared_ptr<extended_block> create_extended_block(
const shared_db_ptr& parent, std::shared_ptr<extended_block>& pblock) = 0;
427 virtual std::shared_ptr<extended_block> create_extended_block(
const shared_db_ptr& parent,
size_t size) = 0;
430 virtual block_id alloc_bid(
bool is_internal) = 0;
The base class of the block class hierarchy.
Contains the actual key value pairs of the btree.
Contains references to other bt_pages.
Contains references to other bth_node allocations.
The actual iterator type used by the btree_node class hierarchy.
A block which represents end user data.
Database external interface.
virtual std::shared_ptr< nbt_leaf_page > read_nbt_leaf_page(const page_info &pi)=0
Open a NBT leaf page.
std::shared_ptr< subnode_nonleaf_block > read_subnode_nonleaf_block(block_id bid)
Open a subnode_nonleaf_block in this context.
virtual std::shared_ptr< block > read_block(const shared_db_ptr &parent, block_id bid)=0
Open a block in the specified context.
std::shared_ptr< block > read_block(const block_info &bi)
Open a block in this context.
virtual std::shared_ptr< external_block > read_external_block(const shared_db_ptr &parent, block_id bid)=0
Open a external_block in the specified context.
virtual std::shared_ptr< nbt_nonleaf_page > read_nbt_nonleaf_page(const page_info &pi)=0
Open a NBT nonleaf page.
virtual std::shared_ptr< subnode_block > read_subnode_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a subnode_block in the specified context.
virtual std::shared_ptr< bbt_nonleaf_page > read_bbt_nonleaf_page(const page_info &pi)=0
Open a BBT nonleaf page.
std::shared_ptr< data_block > read_data_block(block_id bid)
Open a data_block in this context.
virtual node lookup_node(node_id nid)=0
Open a node.
virtual std::shared_ptr< bbt_leaf_page > read_bbt_leaf_page(const page_info &pi)=0
Open a BBT leaf page.
virtual std::shared_ptr< nbt_page > read_nbt_page(const page_info &pi)=0
Open a NBT page.
std::shared_ptr< subnode_nonleaf_block > read_subnode_nonleaf_block(const block_info &bi)
Open a subnode_nonleaf_block in this context.
std::shared_ptr< extended_block > read_extended_block(const block_info &bi)
Open a extended_block in this context.
virtual std::shared_ptr< bbt_page > read_bbt_root()=0
Get the root of the BBT of this context.
virtual std::shared_ptr< extended_block > read_extended_block(const shared_db_ptr &parent, block_id bid)=0
Open an extended_block in the specified context.
std::shared_ptr< external_block > read_external_block(const block_info &bi)
Open a block in this context.
std::shared_ptr< data_block > read_data_block(const block_info &bi)
Open a data_block in this context.
std::shared_ptr< extended_block > read_extended_block(block_id bid)
Open a extended_block in this context.
virtual std::shared_ptr< data_block > read_data_block(const shared_db_ptr &parent, block_id bid)=0
Open a data_block in the specified context.
virtual std::shared_ptr< external_block > read_external_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a external_block in the specified context.
std::shared_ptr< subnode_leaf_block > read_subnode_leaf_block(block_id bid)
Open a subnode_leaf_block in this context.
virtual std::shared_ptr< subnode_leaf_block > read_subnode_leaf_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a subnode_leaf_block in the specified context.
virtual std::shared_ptr< nbt_page > read_nbt_root()=0
Get the root of the NBT of this context.
virtual std::shared_ptr< subnode_block > read_subnode_block(const shared_db_ptr &parent, block_id bid)=0
Open a subnode_block in the specified context.
std::shared_ptr< block > read_block(block_id bid)
Open a block in this context.
virtual block_info lookup_block_info(block_id bid)=0
Lookup information about a block.
virtual node_info lookup_node_info(node_id nid)=0
Lookup information about a node.
std::shared_ptr< external_block > read_external_block(block_id bid)
Open a external_block in this context.
virtual std::shared_ptr< extended_block > read_extended_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a extended_block in the specified context.
virtual std::shared_ptr< subnode_nonleaf_block > read_subnode_nonleaf_block(const shared_db_ptr &parent, block_id bid)=0
Open a subnode_nonleaf_block in the specified context.
virtual std::shared_ptr< block > read_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a block in the specified context.
virtual std::shared_ptr< subnode_nonleaf_block > read_subnode_nonleaf_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a subnode_nonleaf_block in the specified context.
std::shared_ptr< subnode_leaf_block > read_subnode_leaf_block(const block_info &bi)
Open a subnode_leaf_block in this context.
virtual std::shared_ptr< bbt_page > read_bbt_page(const page_info &pi)=0
Open a BBT page.
virtual std::shared_ptr< subnode_leaf_block > read_subnode_leaf_block(const shared_db_ptr &parent, block_id bid)=0
Open a subnode_leaf_block in the specified context.
virtual std::shared_ptr< data_block > read_data_block(const shared_db_ptr &parent, const block_info &bi)=0
Open a data_block in the specified context.
std::shared_ptr< subnode_block > read_subnode_block(const block_info &bi)
Open a subnode_block in this context.
std::shared_ptr< subnode_block > read_subnode_block(block_id bid)
Open a subnode_block in this context.
A data block which refers to other data blocks, in order to extend the physical size limit (8k) to a ...
An in memory representation of the "node" concept in a PST data file.
A block which contains information about subnodes.
Contains the actual subnode information.
Contains references to subnode_leaf_blocks.
boost::uint64_t ulonglong
Contains the definition of all in memory representations of disk structures.
bt_leaf_page< block_id, block_info > bbt_leaf_page
bt_page< node_id, node_info > nbt_page
std::weak_ptr< db_context > weak_db_ptr
bt_nonleaf_page< node_id, node_info > nbt_nonleaf_page
std::shared_ptr< db_context > shared_db_ptr
const_btree_node_iter< block_id, block_info > const_blockinfo_iterator
const_btree_node_iter< node_id, subnode_info > const_subnodeinfo_iterator
bt_page< block_id, block_info > bbt_page
bt_nonleaf_page< block_id, block_info > bbt_nonleaf_page
const_btree_node_iter< node_id, node_info > const_nodeinfo_iterator
bt_leaf_page< node_id, node_info > nbt_leaf_page
Primitive structures defined by MS-PST and MAPI.
An in memory, database format agnostic version of disk::bbt_leaf_entry.
An in memory, database format agnostic version of disk::nbt_leaf_entry.
An in memory, database format agnostic version of disk::block_reference used specifically for the pag...
An in memory, database format agnostic version of disk::sub_leaf_entry.
General utility functions and classes.