Fairport
v1.0.38
|
An abstraction of a table row. More...
#include <table.h>
Public Member Functions | |
const_table_row (const const_table_row &other) | |
Copy construct this row. | |
const_table_row (ulong position, const const_table_ptr &table) | |
Construct a const_table_row object from a table and row offset. | |
row_id | get_row_id () const |
Get the row_id of this row. | |
std::vector< prop_id > | get_prop_list () const |
Get a list of all properties on this object. | |
prop_type | get_prop_type (prop_id id) const |
Get the property type of a given prop_id. | |
bool | prop_exists (prop_id id) const |
Indicates the existance of a given property on this object. | |
size_t | size (prop_id id) const |
Returns the total size of a variable length property. | |
hnid_stream_device | open_prop_stream (prop_id id) |
Creates a stream device over a property on this object. |
An abstraction of a table row.
A const_table_row represents a single row in a table. It models a const_property_object, allowing access to the properties stored in the row.
This object is basically a thin wrapper around the table proper, it holds a reference to the table as well as the index of the row it represents, and fowards most requests to the table.
fairport::const_table_row::const_table_row | ( | const const_table_row & | other | ) | [inline] |
fairport::const_table_row::const_table_row | ( | ulong | position, |
const const_table_ptr & | table | ||
) | [inline] |
Construct a const_table_row object from a table and row offset.
[in] | position | The offset into the table to represent |
[in] | table | The table to reference |
std::vector< fairport::prop_id > fairport::const_table_row::get_prop_list | ( | ) | const [inline, virtual] |
Get a list of all properties on this object.
Implements fairport::const_property_object.
fairport::prop_type fairport::const_table_row::get_prop_type | ( | prop_id | id | ) | const [inline, virtual] |
Get the property type of a given prop_id.
[in] | id | The prop_id |
key_not_found<prop_id> | If the specified property is not present |
Implements fairport::const_property_object.
fairport::row_id fairport::const_table_row::get_row_id | ( | ) | const [inline] |
fairport::hnid_stream_device fairport::const_table_row::open_prop_stream | ( | prop_id | id | ) | [inline, virtual] |
Creates a stream device over a property on this object.
The returned stream device can be used to construct a proper stream:
const_property_object* po = ...; prop_stream nstream(po->open_prop_stream(0x3001));
Which can then be used as any iostream would be.
[in] | id | The prop_id |
key_not_found<prop_id> | If the specified property is not present |
Implements fairport::const_property_object.
bool fairport::const_table_row::prop_exists | ( | prop_id | id | ) | const [inline, virtual] |
Indicates the existance of a given property on this object.
[in] | id | The prop_id |
Implements fairport::const_property_object.
size_t fairport::const_table_row::size | ( | prop_id | id | ) | const [inline, virtual] |
Returns the total size of a variable length property.
[in] | id | The prop_id |
Implements fairport::const_property_object.