PST File Format SDK v0.4
Loading...
Searching...
No Matches
pstsdk::subnode_leaf_block Class Reference

Contains the actual subnode information. More...

#include <node.h>

+ Inheritance diagram for pstsdk::subnode_leaf_block:
+ Collaboration diagram for pstsdk::subnode_leaf_block:

Public Member Functions

 subnode_leaf_block (const shared_db_ptr &db, const block_info &info, std::vector< std::pair< node_id, subnode_info > > subnodes)
 Construct a subnode_leaf_block from disk.
 
const subnode_infoget_value (uint pos) const
 Returns the value at the associated position on this leaf node.
 
const node_idget_key (uint pos) const
 Returns the key at the specified position.
 
uint num_values () const
 Returns the number of entries in this btree_node.
 
- Public Member Functions inherited from pstsdk::subnode_block
 subnode_block (const shared_db_ptr &db, const block_info &info, ushort level)
 Construct a block from disk.
 
virtual ~subnode_block ()
 
ushort get_level () const
 Get the level of this subnode_block.
 
bool is_internal () const
 Returns the blocks internal/external state.
 
- Public Member Functions inherited from pstsdk::block
 block (const shared_db_ptr &db, const block_info &info)
 Basic block constructor.
 
virtual ~block ()
 
size_t get_disk_size () const
 Get the last known size of this block on disk.
 
block_id get_id () const
 Get the block_id of this block.
 
ulonglong get_address () const
 Get the address of this block on disk.
 
- Public Member Functions inherited from pstsdk::btree_node< node_id, subnode_info >
virtual ~btree_node ()
 
virtual const subnode_infolookup (const node_id &key) const=0
 Looks up the associated value for a given key.
 
const_iterator begin () const
 Returns a STL style iterator positioned at the first entry.
 
const_iterator end () const
 Returns a STL style iterator positioned at the "end" entry.
 
int binary_search (const node_id &key) const
 Performs a binary search over the keys of this btree_node.
 
- Public Member Functions inherited from pstsdk::btree_node_leaf< node_id, subnode_info >
virtual ~btree_node_leaf ()
 
const subnode_infolookup (const node_id &key) const
 Looks up the associated value for a given key.
 
- Public Member Functions inherited from pstsdk::btree_node< K, V >
virtual ~btree_node ()
 
const_iterator begin () const
 Returns a STL style iterator positioned at the first entry.
 
const_iterator end () const
 Returns a STL style iterator positioned at the "end" entry.
 
int binary_search (const K &key) const
 Performs a binary search over the keys of this btree_node.
 

Additional Inherited Members

- Public Types inherited from pstsdk::btree_node< node_id, subnode_info >
typedef const_btree_node_iter< node_id, subnode_infoconst_iterator
 
- Public Types inherited from pstsdk::btree_node< K, V >
typedef const_btree_node_iter< K, V > const_iterator
 
- Protected Member Functions inherited from pstsdk::block
shared_db_ptr get_db_ptr () const
 
virtual void trim ()
 
- Protected Member Functions inherited from pstsdk::btree_node< node_id, subnode_info >
virtual void first (btree_iter_impl< node_id, subnode_info > &iter) const=0
 Positions the iterator at the first element on this tree.
 
virtual void last (btree_iter_impl< node_id, subnode_info > &iter) const=0
 Positions the iterator at the "end" element.
 
virtual void next (btree_iter_impl< node_id, subnode_info > &iter) const=0
 Moves the iterator to the next element.
 
virtual void prev (btree_iter_impl< node_id, subnode_info > &iter) const=0
 Moves the iterator to the previous element.
 
- Protected Member Functions inherited from pstsdk::btree_node_leaf< node_id, subnode_info >
void first (btree_iter_impl< node_id, subnode_info > &iter) const
 Positions the iterator at the first element on this tree.
 
void last (btree_iter_impl< node_id, subnode_info > &iter) const
 Positions the iterator at the "end" element.
 
void next (btree_iter_impl< node_id, subnode_info > &iter) const
 Moves the iterator to the next element.
 
void prev (btree_iter_impl< node_id, subnode_info > &iter) const
 Moves the iterator to the previous element.
 
- Protected Member Functions inherited from pstsdk::btree_node< K, V >
virtual void first (btree_iter_impl< K, V > &iter) const =0
 Positions the iterator at the first element on this tree.
 
virtual void last (btree_iter_impl< K, V > &iter) const =0
 Positions the iterator at the "end" element.
 
- Protected Attributes inherited from pstsdk::subnode_block
ushort m_level
 Level of this subnode_block.
 
- Protected Attributes inherited from pstsdk::block
bool m_modified
 True if this block has been modified and needs to be saved.
 
size_t m_size
 The size of this specific block on disk at last save.
 
block_id m_id
 The id of this block.
 
ulonglong m_address
 The address of this specific block on disk, 0 if unknown.
 
weak_db_ptr m_db
 

Detailed Description

Contains the actual subnode information.

Typically a node will point directly to one of these. Because they are blocks, and thus up to 8k in size, they can hold information for about ~300 subnodes in a unicode store, and up to ~600 in an ANSI store.

See also
[MS-PST] 2.2.2.8.3.3.1

Definition at line 837 of file node.h.

Constructor & Destructor Documentation

◆ subnode_leaf_block()

pstsdk::subnode_leaf_block::subnode_leaf_block ( const shared_db_ptr db,
const block_info info,
std::vector< std::pair< node_id, subnode_info > >  subnodes 
)
inline

Construct a subnode_leaf_block from disk.

Parameters
[in]dbThe database context
[in]infoInformation about this block
[in]subnodesInformation about the subnodes

Definition at line 848 of file node.h.

Member Function Documentation

◆ get_key()

const node_id & pstsdk::subnode_leaf_block::get_key ( uint  pos) const
inlinevirtual

Returns the key at the specified position.

This is specific to this btree_node, not the entire tree

Parameters
[in]posThe position to retrieve the key for
Returns
The key at the requested position

Implements pstsdk::btree_node< node_id, subnode_info >.

Definition at line 858 of file node.h.

◆ get_value()

const subnode_info & pstsdk::subnode_leaf_block::get_value ( uint  pos) const
inlinevirtual

Returns the value at the associated position on this leaf node.

Parameters
[in]posThe position to retrieve the value for
Returns
The value at the requested position

Implements pstsdk::btree_node_leaf< node_id, subnode_info >.

Definition at line 856 of file node.h.

◆ num_values()

uint pstsdk::subnode_leaf_block::num_values ( ) const
inlinevirtual

Returns the number of entries in this btree_node.

This is specific to this btree_node, not the entire tree

Returns
The number of keys in this btree_node

Implements pstsdk::btree_node< node_id, subnode_info >.

Definition at line 860 of file node.h.


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