Fairport  v1.0.38
fairport::table Class Reference

The actual table object that clients reference. More...

#include <table.h>

List of all members.

Public Member Functions

 table ()
 Construct an empty table.
 table (const node &n)
 Construct a table from this node.
 table (const table &other)
 Copy constructor.
const_table_row operator[] (ulong row) const
const_table_row_iter begin () const
const_table_row_iter end () const
nodeget_node ()
const nodeget_node () const
ulonglong get_cell_value (ulong row, prop_id id) const
std::vector< byteread_cell (ulong row, prop_id id) const
hnid_stream_device open_cell_stream (ulong row, prop_id id)
std::vector< prop_idget_prop_list () const
prop_type get_prop_type (prop_id id) const
row_id get_row_id (ulong row) const
ulong lookup_row (row_id id) const
size_t size () const

Detailed Description

The actual table object that clients reference.

The table object is an in memory representation of the table context (TC). Clients use the open_table(const node&) free function to create table objects.

A table object's job in general is to allow access to the individual row objects, either via operator[] or the iterators. Most property access should go through the row objects. Other member functions allow for row and type lookup.

See also:
[MS-PST] 2.3.4

Definition at line 346 of file table.h.


Constructor & Destructor Documentation

fairport::table::table ( ) [inline]

Construct an empty table.

Definition at line 351 of file table.h.

fairport::table::table ( const node n) [inline, explicit]

Construct a table from this node.

Parameters:
[in]nThe node to copy and interpret as a table

Definition at line 707 of file table.h.

fairport::table::table ( const table other) [inline]

Copy constructor.

Parameters:
[in]otherThe table to copy

Definition at line 359 of file table.h.


Member Function Documentation

const_table_row_iter fairport::table::begin ( ) const [inline]

Get an iterator pointing to the first row.

Returns:
The requested iterator

Definition at line 366 of file table.h.

const_table_row_iter fairport::table::end ( ) const [inline]

Get an end iterator for this table.

Returns:
The requested iterator

Definition at line 369 of file table.h.

ulonglong fairport::table::get_cell_value ( ulong  row,
prop_id  id 
) const [inline]

Get the contents of the specified cell in the specified row.

Exceptions:
key_not_found<prop_id>If the specified property does not exist on the specified row
out_of_rangeIf the specified row offset is beyond the size of this table
Parameters:
[in]rowThe offset into the table
[in]idThe prop_id to find the cell value of
Returns:
The cell value

Definition at line 379 of file table.h.

node& fairport::table::get_node ( ) [inline]

Get the node backing this table.

Returns:
The node

Definition at line 373 of file table.h.

const node& fairport::table::get_node ( ) const [inline]

Get the node backing this table.

Returns:
The node

Definition at line 376 of file table.h.

std::vector<prop_id> fairport::table::get_prop_list ( ) const [inline]

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.

Returns:
A vector all of the column prop_ids

Definition at line 388 of file table.h.

prop_type fairport::table::get_prop_type ( prop_id  id) const [inline]

Get the type of a property.

Returns:
The property type

Definition at line 391 of file table.h.

row_id fairport::table::get_row_id ( ulong  row) const [inline]

Get the row id of a specified row.

On disk, the first DWORD is always the row_id.

See also:
[MS-PST] 2.3.4.4.1/dwRowID
Returns:
The row id

Definition at line 394 of file table.h.

ulong fairport::table::lookup_row ( row_id  id) const [inline]

Find the offset into the table of the given row_id.

Exceptions:
key_not_found<row_id>If the given row_id is not present in this table
Parameters:
[in]idThe row id to lookup
Returns:
The offset into the table

Definition at line 397 of file table.h.

hnid_stream_device fairport::table::open_cell_stream ( ulong  row,
prop_id  id 
) [inline]

Open a stream over a property in a given row.

Exceptions:
key_not_found<prop_id>If the specified property does not exist on the specified row
out_of_rangeIf the specified row offset is beyond the size of this table
Note:
This operation is only valid for variable length properties
Parameters:
[in]rowThe offset into the table
[in]idThe prop_id to find the cell value of
Returns:
A device which can be used to construct a stream object

Definition at line 385 of file table.h.

const_table_row fairport::table::operator[] ( ulong  row) const [inline]

Get the requested table row.

Parameters:
[in]rowThe offset into the table to construct a row for
Returns:
The requested row

Definition at line 363 of file table.h.

std::vector<byte> fairport::table::read_cell ( ulong  row,
prop_id  id 
) const [inline]

Get the contents of a indirect property in the specified row.

Exceptions:
key_not_found<prop_id>If the specified property does not exist on the specified row
out_of_rangeIf the specified row offset is beyond the size of this table
Parameters:
[in]rowThe offset into the table
[in]idThe prop_id to find the cell value of
Returns:
The raw bytes of the property

Definition at line 382 of file table.h.

size_t fairport::table::size ( ) const [inline]

Get the number of rows in this table.

Returns:
The number of rows

Definition at line 400 of file table.h.


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