Fairport
v1.0.38
|
Null table implementation. More...
#include <table.h>
Public Member Functions | |
node & | get_node () |
Get the node backing this table. | |
const node & | get_node () const |
Get the node backing this table. | |
ulong | lookup_row (row_id id) const |
Find the offset into the table of the given row_id. | |
ulonglong | get_cell_value (ulong row, prop_id) const |
Get the contents of the specified cell in the specified row. | |
std::vector< byte > | read_cell (ulong row, prop_id) const |
Get the contents of a indirect property in the specified row. | |
hnid_stream_device | open_cell_stream (ulong row, prop_id) |
Open a stream over a property in a given row. | |
std::vector< prop_id > | get_prop_list () const |
Get all of the properties on this table. | |
prop_type | get_prop_type (prop_id id) const |
Get the type of a property. | |
row_id | get_row_id (ulong row) const |
Get the row id of a specified row. | |
size_t | size () const |
Get the number of rows in this table. | |
bool | prop_exists (ulong row, prop_id) const |
Check to see if a property exists for a given row. | |
size_t | row_prop_size (ulong row, prop_id) const |
Return the size of a property for a given row. |
Null table implementation.
As an optimization some parts of the PST delay create tables. A message, for example, might not actually have an attachment table subnode unless it actually contains an attachment. Implementations need to be aware of this and handle it, by representing the non-existant table as a table with zero rows so clients can treat table iteration uniformly.
This object is how Fairport represents such non-existant tables. It's a fake table whose only purpose is to have zero rows, with .begin() == .end(). Doing pretty much anything with the table will result in some sort of exception being thrown.
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 |
Implements fairport::table_impl.
node& fairport::empty_table::get_node | ( | ) | [inline, virtual] |
const node& fairport::empty_table::get_node | ( | ) | const [inline, virtual] |
std::vector<prop_id> fairport::empty_table::get_prop_list | ( | ) | const [inline, virtual] |
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.
Implements fairport::table_impl.
Get the row id of a specified row.
On disk, the first DWORD is always the row_id.
Implements fairport::table_impl.
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 |
Implements fairport::table_impl.
hnid_stream_device fairport::empty_table::open_cell_stream | ( | ulong | row, |
prop_id | id | ||
) | [inline, 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 |
Implements fairport::table_impl.
Check to see if a property exists for a given row.
[in] | row | The offset into the table |
[in] | id | The prop_id |
Implements fairport::table_impl.
std::vector<byte> fairport::empty_table::read_cell | ( | ulong | row, |
prop_id | id | ||
) | const [inline, 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 |
Implements fairport::table_impl.
Return the size of a property for a given row.
[in] | row | The offset into the table |
[in] | id | The prop_id |
Implements fairport::table_impl.
size_t fairport::empty_table::size | ( | ) | const [inline, virtual] |