Fairport
v1.0.38
|
PST implementation. More...
#include <database.h>
Public Member Functions | |
bool | is_pst () const |
Is this database a PST? | |
Lookup functions | |
node | lookup_node (node_id nid) |
Open a node. | |
node_info | lookup_node_info (node_id nid) |
Lookup information about a node. | |
block_info | lookup_block_info (block_id bid) |
Lookup information about a block. | |
Page factory functions | |
std::tr1::shared_ptr< bbt_page > | read_bbt_root () |
Get the root of the BBT of this context. | |
std::tr1::shared_ptr< nbt_page > | read_nbt_root () |
Get the root of the NBT of this context. | |
std::tr1::shared_ptr< bbt_page > | read_bbt_page (const page_info &pi) |
Open a BBT page. | |
std::tr1::shared_ptr< nbt_page > | read_nbt_page (const page_info &pi) |
Open a NBT page. | |
std::tr1::shared_ptr < nbt_leaf_page > | read_nbt_leaf_page (const page_info &pi) |
Open a NBT leaf page. | |
std::tr1::shared_ptr < bbt_leaf_page > | read_bbt_leaf_page (const page_info &pi) |
Open a BBT leaf page. | |
std::tr1::shared_ptr < nbt_nonleaf_page > | read_nbt_nonleaf_page (const page_info &pi) |
Open a NBT nonleaf page. | |
std::tr1::shared_ptr < bbt_nonleaf_page > | read_bbt_nonleaf_page (const page_info &pi) |
Open a BBT nonleaf page. | |
Block factory functions | |
std::tr1::shared_ptr< block > | read_block (const shared_db_ptr &parent, block_id bid) |
Open a block in the specified context. | |
std::tr1::shared_ptr< data_block > | read_data_block (const shared_db_ptr &parent, block_id bid) |
Open a data_block in the specified context. | |
std::tr1::shared_ptr < extended_block > | read_extended_block (const shared_db_ptr &parent, block_id bid) |
Open an extended_block in the specified context. | |
std::tr1::shared_ptr < external_block > | read_external_block (const shared_db_ptr &parent, block_id bid) |
Open a external_block in the specified context. | |
std::tr1::shared_ptr < subnode_block > | read_subnode_block (const shared_db_ptr &parent, block_id bid) |
Open a subnode_block in the specified context. | |
std::tr1::shared_ptr < subnode_leaf_block > | read_subnode_leaf_block (const shared_db_ptr &parent, block_id bid) |
Open a subnode_leaf_block in the specified context. | |
std::tr1::shared_ptr < subnode_nonleaf_block > | read_subnode_nonleaf_block (const shared_db_ptr &parent, block_id bid) |
Open a subnode_nonleaf_block in the specified context. | |
std::tr1::shared_ptr< block > | read_block (const shared_db_ptr &parent, const block_info &bi) |
Open a block in the specified context. | |
std::tr1::shared_ptr< data_block > | read_data_block (const shared_db_ptr &parent, const block_info &bi) |
Open a data_block in the specified context. | |
std::tr1::shared_ptr < extended_block > | read_extended_block (const shared_db_ptr &parent, const block_info &bi) |
Open a extended_block in the specified context. | |
std::tr1::shared_ptr < external_block > | read_external_block (const shared_db_ptr &parent, const block_info &bi) |
Open a external_block in the specified context. | |
std::tr1::shared_ptr < subnode_block > | read_subnode_block (const shared_db_ptr &parent, const block_info &bi) |
Open a subnode_block in the specified context. | |
std::tr1::shared_ptr < subnode_leaf_block > | read_subnode_leaf_block (const shared_db_ptr &parent, const block_info &bi) |
Open a subnode_leaf_block in the specified context. | |
std::tr1::shared_ptr < subnode_nonleaf_block > | read_subnode_nonleaf_block (const shared_db_ptr &parent, const block_info &bi) |
Open a subnode_nonleaf_block in the specified context. | |
Protected Member Functions | |
database_impl () | |
database_impl (const std::wstring &filename) | |
Construct a database_impl from this filename. | |
void | validate_header () |
Validate the header of this file. | |
std::vector< byte > | read_block_data (const block_info &bi) |
Read block data, perform validation checks. | |
std::vector< byte > | read_page_data (const page_info &pi) |
Read page data, perform validation checks. | |
std::tr1::shared_ptr < nbt_leaf_page > | read_nbt_leaf_page (const page_info &pi, disk::nbt_leaf_page< T > &the_page) |
std::tr1::shared_ptr < bbt_leaf_page > | read_bbt_leaf_page (const page_info &pi, disk::bbt_leaf_page< T > &the_page) |
template<typename K , typename V > | |
std::tr1::shared_ptr < bt_nonleaf_page< K, V > > | read_bt_nonleaf_page (const page_info &pi, disk::bt_page< T, disk::bt_entry< T > > &the_page) |
std::tr1::shared_ptr < subnode_leaf_block > | read_subnode_leaf_block (const shared_db_ptr &parent, const block_info &bi, disk::sub_leaf_block< T > &sub_block) |
std::tr1::shared_ptr < subnode_nonleaf_block > | read_subnode_nonleaf_block (const shared_db_ptr &parent, const block_info &bi, disk::sub_nonleaf_block< T > &sub_block) |
Protected Attributes | |
file | m_file |
disk::header< T > | m_header |
std::tr1::shared_ptr< bbt_page > | m_bbt_root |
std::tr1::shared_ptr< nbt_page > | m_nbt_root |
Friends | |
shared_db_ptr | open_database (const std::wstring &filename) |
Open a db_context for the given file. | |
std::tr1::shared_ptr< small_pst > | open_small_pst (const std::wstring &filename) |
Try to open the given file as an ANSI store. | |
std::tr1::shared_ptr< large_pst > | open_large_pst (const std::wstring &filename) |
Try to open the given file as a Unicode store. |
PST implementation.
The actual implementation of a database context - this class is responsible for translating between the disk format (as indicated by the template parameter) and the disk-agnostic in memory classes returned from the various factory methods.
open_database will instantiate the correct database_impl type for a given filename.
T | ulonglong for a Unicode store, ulong for an ANSI store |
Definition at line 72 of file database.h.
fairport::database_impl< T >::database_impl | ( | ) | [protected] |
fairport::database_impl< T >::database_impl | ( | const std::wstring & | filename | ) | [inline, protected] |
Construct a database_impl from this filename.
invalid_format | if the file format is not understood |
runtime_error | if an error occurs opening the file |
[in] | filename | The filename to open |
Definition at line 337 of file database.h.
bool fairport::database_impl< T >::is_pst | ( | ) | const [inline, virtual] |
Is this database a PST?
Implements fairport::db_context.
Definition at line 76 of file database.h.
fairport::block_info fairport::database_impl< T >::lookup_block_info | ( | block_id | bid | ) | [inline, virtual] |
Lookup information about a block.
key_not_found<block_id> | if the specified block was not found |
[in] | bid | The id of the block to lookup |
Implements fairport::db_context.
Definition at line 539 of file database.h.
node fairport::database_impl< T >::lookup_node | ( | node_id | nid | ) | [inline, virtual] |
Open a node.
key_not_found<node_id> | if the specified node was not found |
[in] | nid | The id of the node to lookup |
Implements fairport::db_context.
Definition at line 81 of file database.h.
fairport::node_info fairport::database_impl< T >::lookup_node_info | ( | node_id | nid | ) | [inline, virtual] |
Lookup information about a node.
key_not_found<node_id> | if the specified node was not found |
[in] | nid | The id of the node to lookup |
Implements fairport::db_context.
Definition at line 533 of file database.h.
std::tr1::shared_ptr< fairport::bbt_leaf_page > fairport::database_impl< T >::read_bbt_leaf_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a BBT leaf page.
[in] | pi | Information about the page to open |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 388 of file database.h.
std::tr1::shared_ptr< fairport::bbt_leaf_page > fairport::database_impl< T >::read_bbt_leaf_page | ( | const page_info & | pi, |
disk::bbt_leaf_page< T > & | the_page | ||
) | [inline, protected] |
Definition at line 405 of file database.h.
std::tr1::shared_ptr< fairport::bbt_nonleaf_page > fairport::database_impl< T >::read_bbt_nonleaf_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a BBT nonleaf page.
[in] | pi | Information about the page to open |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 464 of file database.h.
std::tr1::shared_ptr< fairport::bbt_page > fairport::database_impl< T >::read_bbt_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a BBT page.
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 481 of file database.h.
std::tr1::shared_ptr< fairport::bbt_page > fairport::database_impl< T >::read_bbt_root | ( | ) | [inline, virtual] |
Get the root of the BBT of this context.
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 313 of file database.h.
std::tr1::shared_ptr<block> fairport::database_impl< T >::read_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 101 of file database.h.
std::tr1::shared_ptr< fairport::block > fairport::database_impl< T >::read_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 554 of file database.h.
std::vector< fairport::byte > fairport::database_impl< T >::read_block_data | ( | const block_info & | bi | ) | [inline, protected] |
Read block data, perform validation checks.
[in] | bi | The block information to read from disk |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Definition at line 238 of file database.h.
std::tr1::shared_ptr< fairport::bt_nonleaf_page< K, V > > fairport::database_impl< T >::read_bt_nonleaf_page | ( | const page_info & | pi, |
disk::bt_page< T, disk::bt_entry< T > > & | the_page | ||
) | [inline, protected] |
Definition at line 446 of file database.h.
std::tr1::shared_ptr<data_block> fairport::database_impl< T >::read_data_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a data_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 103 of file database.h.
std::tr1::shared_ptr< fairport::data_block > fairport::database_impl< T >::read_data_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a data_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 571 of file database.h.
std::tr1::shared_ptr<extended_block> fairport::database_impl< T >::read_extended_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open an extended_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 105 of file database.h.
std::tr1::shared_ptr< fairport::extended_block > fairport::database_impl< T >::read_extended_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a extended_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 588 of file database.h.
std::tr1::shared_ptr<external_block> fairport::database_impl< T >::read_external_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a external_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 107 of file database.h.
std::tr1::shared_ptr< fairport::external_block > fairport::database_impl< T >::read_external_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a external_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 621 of file database.h.
std::tr1::shared_ptr< fairport::nbt_leaf_page > fairport::database_impl< T >::read_nbt_leaf_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a NBT leaf page.
[in] | pi | Information about the page to open |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 348 of file database.h.
std::tr1::shared_ptr< fairport::nbt_leaf_page > fairport::database_impl< T >::read_nbt_leaf_page | ( | const page_info & | pi, |
disk::nbt_leaf_page< T > & | the_page | ||
) | [inline, protected] |
Definition at line 365 of file database.h.
std::tr1::shared_ptr< fairport::nbt_nonleaf_page > fairport::database_impl< T >::read_nbt_nonleaf_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a NBT nonleaf page.
[in] | pi | Information about the page to open |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 428 of file database.h.
std::tr1::shared_ptr< fairport::nbt_page > fairport::database_impl< T >::read_nbt_page | ( | const page_info & | pi | ) | [inline, virtual] |
Open a NBT page.
[in] | pi | Information about the page to open |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 507 of file database.h.
std::tr1::shared_ptr< fairport::nbt_page > fairport::database_impl< T >::read_nbt_root | ( | ) | [inline, virtual] |
Get the root of the NBT of this context.
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 325 of file database.h.
std::vector< fairport::byte > fairport::database_impl< T >::read_page_data | ( | const page_info & | pi | ) | [protected] |
Read page data, perform validation checks.
[in] | pi | The page information to read from disk |
unexpected_page | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the page appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's signature appears incorrect |
database_corrupt | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the page trailer's ptypeRepeat != ptype |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the page's CRC doesn't match the trailer |
Definition at line 276 of file database.h.
std::tr1::shared_ptr<subnode_block> fairport::database_impl< T >::read_subnode_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a subnode_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 109 of file database.h.
std::tr1::shared_ptr< fairport::subnode_block > fairport::database_impl< T >::read_subnode_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a subnode_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 650 of file database.h.
std::tr1::shared_ptr<subnode_leaf_block> fairport::database_impl< T >::read_subnode_leaf_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a subnode_leaf_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 111 of file database.h.
std::tr1::shared_ptr< fairport::subnode_leaf_block > fairport::database_impl< T >::read_subnode_leaf_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a subnode_leaf_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 674 of file database.h.
std::tr1::shared_ptr< fairport::subnode_leaf_block > fairport::database_impl< T >::read_subnode_leaf_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi, | ||
disk::sub_leaf_block< T > & | sub_block | ||
) | [inline, protected] |
Definition at line 712 of file database.h.
std::tr1::shared_ptr<subnode_nonleaf_block> fairport::database_impl< T >::read_subnode_nonleaf_block | ( | const shared_db_ptr & | parent, |
block_id | bid | ||
) | [inline, virtual] |
Open a subnode_nonleaf_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bid | The id of the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 113 of file database.h.
std::tr1::shared_ptr< fairport::subnode_nonleaf_block > fairport::database_impl< T >::read_subnode_nonleaf_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi | ||
) | [inline, virtual] |
Open a subnode_nonleaf_block in the specified context.
[in] | parent | The context to open this block in. It must be either this context or a child context of this context. |
[in] | bi | Information about the block to open |
unexpected_block | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the parameters of the block appear incorrect |
sig_mismatch | (FAIRPORT_VALIDATION_LEVEL_WEAK) If the block trailer's signature appears incorrect |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_FULL) If the block's CRC doesn't match the trailer |
Implements fairport::db_context.
Definition at line 693 of file database.h.
std::tr1::shared_ptr< fairport::subnode_nonleaf_block > fairport::database_impl< T >::read_subnode_nonleaf_block | ( | const shared_db_ptr & | parent, |
const block_info & | bi, | ||
disk::sub_nonleaf_block< T > & | sub_block | ||
) | [inline, protected] |
Definition at line 741 of file database.h.
void fairport::database_impl< T >::validate_header | ( | ) | [protected] |
Validate the header of this file.
invalid_format | if this header is for a database format incompatible with this object |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match |
shared_db_ptr open_database | ( | const std::wstring & | filename | ) | [friend] |
Open a db_context for the given file.
invalid_format | if the file format is not understood |
runtime_error | if an error occurs opening the file |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match |
[in] | filename | The filename to open |
std::tr1::shared_ptr<large_pst> open_large_pst | ( | const std::wstring & | filename | ) | [friend] |
Try to open the given file as a Unicode store.
invalid_format | if the file format is not Unicode |
runtime_error | if an error occurs opening the file |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match |
[in] | filename | The filename to open |
std::tr1::shared_ptr<small_pst> open_small_pst | ( | const std::wstring & | filename | ) | [friend] |
Try to open the given file as an ANSI store.
invalid_format | if the file format is not ANSI |
runtime_error | if an error occurs opening the file |
crc_fail | (FAIRPORT_VALIDATION_LEVEL_WEAK) if the CRC of this header doesn't match |
[in] | filename | The filename to open |
std::tr1::shared_ptr<bbt_page> fairport::database_impl< T >::m_bbt_root [protected] |
Definition at line 168 of file database.h.
file fairport::database_impl< T >::m_file [protected] |
Definition at line 166 of file database.h.
disk::header<T> fairport::database_impl< T >::m_header [protected] |
Definition at line 167 of file database.h.
std::tr1::shared_ptr<nbt_page> fairport::database_impl< T >::m_nbt_root [protected] |
Definition at line 169 of file database.h.