|
PST File Format SDK v0.4
|
The base class of the block class hierarchy. More...
#include <node.h>
Inheritance diagram for pstsdk::block:
Collaboration diagram for pstsdk::block:Public Member Functions | |
| block (const shared_db_ptr &db, const block_info &info) | |
| Basic block constructor. | |
| virtual | ~block () |
| virtual bool | is_internal () const =0 |
| Returns the blocks internal/external state. | |
| 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. | |
Protected Member Functions | |
| shared_db_ptr | get_db_ptr () const |
| virtual void | trim () |
Protected Attributes | |
| 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 |
The base class of the block class hierarchy.
A block is an atomic unit of storage in a PST file. This class, and other classes in this hierarchy, are in memory representations of those blocks on disk. They are immutable, and are shared freely between different node instances as needed (via shared pointers). A block also knows how to read any blocks it may refer to (in the case of extended_block or a subnode_block).
All blocks in the block hierarchy are also in the category of what is known as dependant objects. This means is they only keep a weak reference to the database context to which they're a member. Contrast this to an independant object such as the node, which keeps a strong ref or a full shared_ptr to the related context. This implies that someone must externally make sure the database context outlives it's blocks - this is usually done by the database context itself or the node which holds these blocks.
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
pure virtual |
Returns the blocks internal/external state.
Implemented in pstsdk::extended_block, pstsdk::external_block, and pstsdk::subnode_block.
|
protected |
|
protected |
|
protected |
|
protected |