Fairport  v1.0.38
fairport::const_table_row Class Reference

An abstraction of a table row. More...

#include <table.h>

+ Inheritance diagram for fairport::const_table_row:
+ Collaboration diagram for fairport::const_table_row:

List of all members.

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_idget_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.

Detailed Description

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.

Definition at line 49 of file table.h.


Constructor & Destructor Documentation

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

Copy construct this row.

Parameters:
[in]otherThe row to copy from

Definition at line 54 of file table.h.

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.

Parameters:
[in]positionThe offset into the table to represent
[in]tableThe table to reference

Definition at line 59 of file table.h.


Member Function Documentation

std::vector< fairport::prop_id > fairport::const_table_row::get_prop_list ( ) const [inline, virtual]

Get a list of all properties on this object.

Returns:
A vector of all properties on this object

Implements fairport::const_property_object.

Definition at line 429 of file table.h.

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.

Parameters:
[in]idThe prop_id
Exceptions:
key_not_found<prop_id>If the specified property is not present
Returns:
The type of the prop_id

Implements fairport::const_property_object.

Definition at line 448 of file table.h.

fairport::row_id fairport::const_table_row::get_row_id ( ) const [inline]

Get the row_id of this row.

Returns:
The row_id of this row

Definition at line 458 of file table.h.

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.

Note:
This is operation is only valid for variable length properties
Parameters:
[in]idThe prop_id
Exceptions:
key_not_found<prop_id>If the specified property is not present
Returns:
A stream device for the requested property

Implements fairport::const_property_object.

Definition at line 488 of file table.h.

bool fairport::const_table_row::prop_exists ( prop_id  id) const [inline, virtual]

Indicates the existance of a given property on this object.

Parameters:
[in]idThe prop_id
Returns:
true if the property exists

Implements fairport::const_property_object.

Definition at line 453 of file table.h.

size_t fairport::const_table_row::size ( prop_id  id) const [inline, virtual]

Returns the total size of a variable length property.

Note:
This operation is only valid for variable length properties
Parameters:
[in]idThe prop_id
Returns:
The vector.size() if read_prop was called for this prop

Implements fairport::const_property_object.

Definition at line 443 of file table.h.


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