Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

hierarchical_view Class Reference
[Classes and types for external use]

hierarchical view class onto a stack of tables More...

#include <vdbl_hrview.h>

Inheritance diagram for hierarchical_view:

Inheritance graph
[legend]
Collaboration diagram for hierarchical_view:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::pair< std::string,
_VDBL_col
_T_colspec

Public Methods

 hierarchical_view (const _VDBL_tableid &__ti, _VDBL_table *__t, const _VDBL_context &__c, _V_enum __e=V_window)
 hierarchical_view (const hierarchical_view &_v)
template<class _R> bool get (const tableid &_ti, const rowid &_ri, const colid &_ci, _R &r) const
template<class _R> bool get_raw_ptr (const tableid &_ti, const rowid &_ri, const colid &_ci, _R const *&r) const
void push_table (const _VDBL_tableid &__ti, _VDBL_table *__t)
void push_table (const _VDBL_tableid &__ti, _VDBL_table *__t, const std::vector< _VDBL_rowid > &_rs)
_VDBL_tableid pop_table ()
const std::type_info & get_colinfo (const std::string &_C_n, triple< bool, _VDBL_colid, _VDBL_colflags > &_r) const
bool remove (std::pair< _VDBL_tableid, _VDBL_rowid > _r)
std::ostream & print_col (std::ostream &o, const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, bool &printed) const
template<class _R> bool get_raw_ptr (const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, _R const *&r) const
template<class _R> bool get (const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, _R &r) const
template<class _R> bool get (const rowid &_ri, const std::string &_c, _R &r) const
template<class _R> bool get (const rowid &_ri, const char *_c, _R &r) const

Protected Types

typedef _default_iterator<
_VDBL_col, const _VDBL_col &,
const _VDBL_col * > 
default_const_iterator
typedef _col_iterator< _VDBL_col,
const _VDBL_col &, const
_VDBL_col * > 
col_const_iterator
typedef _row_iterator< _VDBL_row,
const _VDBL_row &, const
_VDBL_row * > 
row_const_iterator

Protected Methods

triple< _VDBL_tableid, _VDBL_colid,
void * > 
_next_def_col (const _VDBL_tableid &_t, const _VDBL_colid &_c, void *_d) const
triple< _VDBL_tableid, _VDBL_colid,
void * > 
_prev_def_col (const _VDBL_tableid &_t, const _VDBL_colid &_c, void *_d) const
void * _copy_def_data (void *_d) const
triple< _VDBL_tableid, _VDBL_colid,
void * > 
_next_col (const _VDBL_tableid &_t, const _VDBL_rowid &_r, const _VDBL_colid &_c, void *_d) const
triple< _VDBL_tableid, _VDBL_colid,
void * > 
_prev_col (const _VDBL_tableid &_t, const _VDBL_rowid &_r, const _VDBL_colid &_c, void *_d) const
void * _copy_col_data (void *_d) const
triple< _VDBL_tableid, _VDBL_rowid,
void * > 
_next_row (const _VDBL_tableid &_t, const _VDBL_rowid &_r, void *_d) const
triple< _VDBL_tableid, _VDBL_rowid,
void * > 
_prev_row (const _VDBL_tableid &_t, const _VDBL_rowid &_r, void *_d) const
void * _copy_row_data (void *_d) const
void made_change ()
 increment the change counter.

unsigned int get_change_ctr () const
 read the change counter


Protected Attributes

_V_rows _V_r
_V_cols _V_c
_V_colxref _V_cx

Detailed Description

This is the hierarchical view. It is an in-memory view onto a stack of VDBL tables.

In a hierachical view the master table (the table lowest in the stack) determines the columns valid in this view. The tables upwards in the stack add rows and can change the default values of columns. The upmost definition of a column counts.

Definition at line 731 of file vdbl_hrview.h.


Member Typedef Documentation

typedef std::pair<std::string,_VDBL_col> _VDBL_view::_T_colspec [inherited]
 

This is the description of one column

Definition at line 84 of file vdbl_view.h.

typedef _col_iterator<_VDBL_col, const _VDBL_col&, const _VDBL_col*> _VDBL_view::col_const_iterator [protected, inherited]
 

const iterator over all columns

Definition at line 461 of file vdbl_view.h.

typedef _default_iterator<_VDBL_col, const _VDBL_col&, const _VDBL_col*> _VDBL_view::default_const_iterator [protected, inherited]
 

const iterator over all default columns

Definition at line 324 of file vdbl_view.h.

typedef _row_iterator<_VDBL_row, const _VDBL_row&, const _VDBL_row*> _VDBL_view::row_const_iterator [protected, inherited]
 

const iterator over all rows

Definition at line 590 of file vdbl_view.h.


Constructor & Destructor Documentation

hierarchical_view::hierarchical_view const _VDBL_tableid   __ti,
_VDBL_table   __t,
const _VDBL_context   __c,
_V_enum    __e = V_window
[inline]
 

standard constructor which initalizes the table and the tableid of the master table, the evaluation context, and the view type.

Definition at line 743 of file vdbl_hrview.h.

hierarchical_view::hierarchical_view const hierarchical_view &    _v [inline]
 

copy constructor

Definition at line 750 of file vdbl_hrview.h.


Member Function Documentation

void* _VDBL_hierarchicalview::_copy_col_data void *    _d const [inline, protected, virtual, inherited]
 

This virtual function has to be overloaded by the derived view classes, and it performs the step to the next row for a _row_iterator.

Reimplemented from _VDBL_view.

Definition at line 289 of file vdbl_hrview.h.

void* _VDBL_hierarchicalview::_copy_def_data void *    _d const [inline, protected, virtual, inherited]
 

This virtual function has to be overloaded by the derived view classes, and it performs the step to the next column for a _col_iterator.

Reimplemented from _VDBL_view.

Definition at line 232 of file vdbl_hrview.h.

void* _VDBL_hierarchicalview::_copy_row_data void *    _d const [inline, protected, virtual, inherited]
 

This is the fundamental class for iterators over all default columns, defining basic in(de)crementation for overloading, and basic comparison.

Reimplemented from _VDBL_view.

Definition at line 326 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_colid,void*> _VDBL_hierarchicalview::_next_col const _VDBL_tableid   _t,
const _VDBL_rowid   _r,
const _VDBL_colid   _c,
void *    _d
const [inline, protected, inherited]
 

This virtual function has to be overloaded by the derived view classes, and it performs the step to the previous column for a _col_iterator.

Reimplemented from _VDBL_view.

Definition at line 237 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_colid,void*> _VDBL_hierarchicalview::_next_def_col const _VDBL_tableid   _t,
const _VDBL_colid   _c,
void *    _d
const [inline, protected, virtual, inherited]
 

This virtual function has to be overloaded by the derived view classes, and it performs the step to the previous default of a column a _default_iterator.

Reimplemented from _VDBL_view.

Definition at line 180 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_rowid,void*> _VDBL_hierarchicalview::_next_row const _VDBL_tableid   _t,
const _VDBL_rowid   _r,
void *    _d
const [inline, protected, inherited]
 

This virtual function has to be overloaded by the derived view classes, and it performs the step to the previous row for a _row_iterator.

Reimplemented from _VDBL_view.

Definition at line 294 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_colid,void*> _VDBL_hierarchicalview::_prev_col const _VDBL_tableid   _t,
const _VDBL_rowid   _r,
const _VDBL_colid   _c,
void *    _d
const [inline, protected, inherited]
 

This function destroys the additional data needed by a _col_iterator

Reimplemented from _VDBL_view.

Definition at line 259 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_colid,void*> _VDBL_hierarchicalview::_prev_def_col const _VDBL_tableid   _t,
const _VDBL_colid   _c,
void *    _d
const [inline, protected, inherited]
 

This function destroys the additional data needed by a _default_iterator

Reimplemented from _VDBL_view.

Definition at line 202 of file vdbl_hrview.h.

triple<_VDBL_tableid,_VDBL_rowid,void*> _VDBL_hierarchicalview::_prev_row const _VDBL_tableid   _t,
const _VDBL_rowid   _r,
void *    _d
const [inline, protected, inherited]
 

This function destroys the additional data needed by a _row_iterator

Reimplemented from _VDBL_view.

Definition at line 308 of file vdbl_hrview.h.

template<class _R>
bool _VDBL_hierarchicalview::get const std::pair< _VDBL_tableid, _VDBL_rowid > &    _ri,
const _VDBL_colid   _ci,
_R &    r
const [inline, inherited]
 

get the data from column _ci in row _ri.second of table _ri.first. The data stored in the column must be of type _R.

Definition at line 644 of file vdbl_hrview.h.

template<class _R>
bool hierarchical_view::get const rowid   _ri,
const char *    _c,
_R &    r
const [inline]
 

get the data from column _c in row _ri. The data stored in the column must be of type _R.

Definition at line 782 of file vdbl_hrview.h.

template<class _R>
bool hierarchical_view::get const rowid   _ri,
const std::string &    _c,
_R &    r
const [inline]
 

get the data from column _c in row _ri. The data stored in the column must be of type _R.

Definition at line 777 of file vdbl_hrview.h.

template<class _R>
bool hierarchical_view::get const tableid   _ti,
const rowid   _ri,
const colid   _ci,
_R &    r
const [inline]
 

get the data from column _ci in row _ri of table _ti. The data stored in the column must be of type _R.

Definition at line 757 of file vdbl_hrview.h.

const std::type_info& _VDBL_hierarchicalview::get_colinfo const std::string &    _C_n,
triple< bool, _VDBL_colid, _VDBL_colflags > &    _r
const [inline, virtual, inherited]
 

return the type of this view

Reimplemented from _VDBL_view.

Definition at line 487 of file vdbl_hrview.h.

template<class _R>
bool _VDBL_hierarchicalview::get_raw_ptr const std::pair< _VDBL_tableid, _VDBL_rowid > &    _ri,
const _VDBL_colid   _ci,
_R const *&    r
const [inline, inherited]
 

get a const ptr to the data from column _ci in row _ri.second of table _ri.first. The data stored in the column must be of type _R. In this function no data copying is done. Note that this function returns a pointer to the columns raw data, so it can only be used to refer to constant columns.

Definition at line 625 of file vdbl_hrview.h.

template<class _R>
bool hierarchical_view::get_raw_ptr const tableid   _ti,
const rowid   _ri,
const colid   _ci,
_R const *&    r
const [inline]
 

get a const pointer to the data from column _ci in row _ri of table _ti. The data stored in the column must be of type _R. This only works if the column's data is constant. There is no implicit copying performed.

Definition at line 767 of file vdbl_hrview.h.

_VDBL_tableid _VDBL_hierarchicalview::pop_table   [inline, inherited]
 

remove the topmost table from the view, and return its table id.

Definition at line 458 of file vdbl_hrview.h.

std::ostream& _VDBL_hierarchicalview::print_col std::ostream &    o,
const std::pair< _VDBL_tableid, _VDBL_rowid > &    _ri,
const _VDBL_colid   _ci,
bool &    printed
const [inline, inherited]
 

print the contents od column _ci in row _ri.second of table _ri.first.

Definition at line 599 of file vdbl_hrview.h.

void _VDBL_hierarchicalview::push_table const _VDBL_tableid   __ti,
_VDBL_table   __t,
const std::vector< _VDBL_rowid > &    _rs
[inline, inherited]
 

This pushes a new table onto the top of the hierarchical view stack. Additionally, a subset of the table's rows, which are visible in the view, can be specified.

Definition at line 433 of file vdbl_hrview.h.

void _VDBL_hierarchicalview::push_table const _VDBL_tableid   __ti,
_VDBL_table   __t
[inline, inherited]
 

This pushes a new table onto the top of the hierarchical view stack.

Definition at line 408 of file vdbl_hrview.h.

bool _VDBL_hierarchicalview::remove std::pair< _VDBL_tableid, _VDBL_rowid   _r [inline, inherited]
 

for now window views can only make changes in the top table in the list of tables

Definition at line 519 of file vdbl_hrview.h.


Member Data Documentation

_V_cols _VDBL_hierarchicalview::_V_c [protected, inherited]
 

This contains all columns of the view

Definition at line 89 of file vdbl_hrview.h.

_V_colxref _VDBL_hierarchicalview::_V_cx [protected, inherited]
 

This is the cross reference: view col id -> <tableid, real col id>

Definition at line 93 of file vdbl_hrview.h.

_V_rows _VDBL_hierarchicalview::_V_r [protected, inherited]
 

This contains all rows of the view

Definition at line 85 of file vdbl_hrview.h.


The documentation for this class was generated from the following file:
Generated on Tue Nov 4 01:29:38 2003 for Vienna Database Library by doxygen1.2.18