|
PST File Format SDK v0.4
|
Table implementation. More...
#include <table.h>
Inheritance diagram for pstsdk::table_impl:
Collaboration diagram for pstsdk::table_impl:Public Member Functions | |
| virtual | ~table_impl () |
| virtual ulong | lookup_row (row_id id) const =0 |
| Find the offset into the table of the given row_id. | |
| const_table_row | operator[] (ulong row) const |
| Get the requested table row. | |
| const_table_row_iter | begin () const |
| Get an iterator pointing to the first row. | |
| const_table_row_iter | end () const |
| Get an end iterator for this table. | |
| virtual node & | get_node ()=0 |
| Get the node backing this table. | |
| virtual const node & | get_node () const =0 |
| Get the node backing this table. | |
| virtual ulonglong | get_cell_value (ulong row, prop_id id) const =0 |
| Get the contents of the specified cell in the specified row. | |
| virtual std::vector< byte > | read_cell (ulong row, prop_id id) const =0 |
| Get the contents of a indirect property in the specified row. | |
| virtual hnid_stream_device | open_cell_stream (ulong row, prop_id id)=0 |
| Open a stream over a property in a given row. | |
| virtual std::vector< prop_id > | get_prop_list () const =0 |
| Get all of the properties on this table. | |
| virtual prop_type | get_prop_type (prop_id id) const =0 |
| Get the type of a property. | |
| virtual row_id | get_row_id (ulong row) const =0 |
| Get the row id of a specified row. | |
| virtual size_t | size () const =0 |
| Get the number of rows in this table. | |
| virtual bool | prop_exists (ulong row, prop_id id) const =0 |
| Check to see if a property exists for a given row. | |
| virtual size_t | row_prop_size (ulong row, prop_id id) const =0 |
| Return the size of a property for a given row. | |
Table implementation.
Similar to the node and heap classes, the table class is divided into an implementation class and stack based class. Child objects (in this case, table rows) can reference the implementation class and thus safely outlive the stack based class.
A key difference in the table implementation, however, is that there are actually a few different types of tables. So instead of having one impl class, we have one impl base class to which everyone holds a shared pointer to, and several child classes which we instiate depending on the actual underlying table type. This is the table implementation "interface" class.
|
inline |
|
inline |
Get the contents of the specified cell in the specified row.
| key_not_found<prop_id> | If the specified property does not exist on the specified row |
| out_of_range | If the specified row offset is beyond the size of this table |
| [in] | row | The offset into the table |
| [in] | id | The prop_id to find the cell value of |
Implemented in pstsdk::basic_table< T >.
Get all of the properties on this table.
This returns the properties behind all of the columns which make up this table. This doesn't imply that every property is present on every row, however.
Implemented in pstsdk::basic_table< T >.
Get the row id of a specified row.
On disk, the first DWORD is always the row_id.
Implemented in pstsdk::basic_table< T >.
Find the offset into the table of the given row_id.
| key_not_found<row_id> | If the given row_id is not present in this table |
| [in] | id | The row id to lookup |
Implemented in pstsdk::basic_table< T >.
|
pure virtual |
Open a stream over a property in a given row.
| key_not_found<prop_id> | If the specified property does not exist on the specified row |
| out_of_range | If the specified row offset is beyond the size of this table |
| [in] | row | The offset into the table |
| [in] | id | The prop_id to find the cell value of |
Implemented in pstsdk::basic_table< T >.
|
inline |
Check to see if a property exists for a given row.
| [in] | row | The offset into the table |
| [in] | id | The prop_id |
Implemented in pstsdk::basic_table< T >.
|
pure virtual |
Get the contents of a indirect property in the specified row.
| key_not_found<prop_id> | If the specified property does not exist on the specified row |
| out_of_range | If the specified row offset is beyond the size of this table |
| [in] | row | The offset into the table |
| [in] | id | The prop_id to find the cell value of |
Implemented in pstsdk::basic_table< T >.
Return the size of a property for a given row.
| [in] | row | The offset into the table |
| [in] | id | The prop_id |
Implemented in pstsdk::basic_table< T >.
|
pure virtual |
Get the number of rows in this table.
Implemented in pstsdk::basic_table< T >.