view Class Reference
[Classes and types for external use]

standard view class onto a single table More...

#include <vdbl_stview.h>

Inheritance diagram for view:

Inheritance graph
[legend]
Collaboration diagram for view:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
_Base::default_const_iterator 
defaults_const_iterator
 iterator over all default columns
typedef std::pair< std::string,
_VDBL_col
_T_colspec

Public Member Functions

 view (const _VDBL_tableid &__ti, _VDBL_table *__t, const _VDBL_context &__c, _V_enum __e=V_hole)
 view (const view &_v)
virtual viewnew_copy ()
virtual void destroy_copy (view *v)
template<class _TR >
bool get (const tableid &_ti, const rowid &_ri, const colid &_ci, _TR &r) const
template<class _TR >
bool get_raw_ptr (const tableid &_ti, const rowid &_ri, const colid &_ci, _TR const *&r) const
const colget_raw_col (const std::pair< tableid, rowid > &_ri, const colid &_ci, row const *&_rr, bool &error) const
virtual _VDBL_viewnew_copy () VDBL_PURE_VIRTUALvirtual void destroy_copy(_VDBL_view *v) VDBL_PURE_VIRTUALvirtual const std
virtual void destroy_copy (_VDBL_view *v)
bool insert (const std::vector< _T_colspec > &_row)
bool add_visible (const std::vector< _VDBL_rowid > &_rs)
bool rm_visible (const std::vector< _VDBL_rowid > &_rs)
std::ostream & print_col (std::ostream &o, const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, bool &printed) const
template<class _TR >
bool get (const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, _TR &r) const
template<class _TR >
bool get_raw_ptr (const std::pair< _VDBL_tableid, _VDBL_rowid > &_ri, const _VDBL_colid &_ci, _TR const *&r) const
template<class _TR >
bool get (const rowid &_ri, const std::string &_c, _TR &r) const
template<class _TR >
bool get (const rowid &_ri, const char *_c, _TR &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 Member Functions

std::triple< _VDBL_tableid,
_VDBL_colid, void * > 
_next_def_col (const _VDBL_tableid &_t, const _VDBL_colid &_c, void *_d) const
void * _copy_def_data (void *_d) const
void * _copy_col_data (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


Detailed Description

This is the standard view. It is an in-memory view onto a single VDBL table.

Definition at line 704 of file vdbl_stview.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 61 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 439 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 301 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 568 of file vdbl_view.h.


Constructor & Destructor Documentation

view::view ( const _VDBL_tableid __ti,
_VDBL_table __t,
const _VDBL_context __c,
_V_enum  __e = V_hole 
) [inline]

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

Definition at line 716 of file vdbl_stview.h.

view::view ( const view _v  )  [inline]

copy constructor

Definition at line 723 of file vdbl_stview.h.


Member Function Documentation

void* _VDBL_standardview::_copy_col_data ( void *  _d  )  const [inline, protected, virtual, inherited]

This function copies the additional data needed by a _col_iterator 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. 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. This function destroys the additional data needed by a _row_iterator

Reimplemented from _VDBL_view.

Definition at line 196 of file vdbl_stview.h.

void* _VDBL_standardview::_copy_def_data ( void *  _d  )  const [inline, protected, virtual, inherited]

This function copies the additional data needed by a _default_iterator 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. 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. This function destroys the additional data needed by a _col_iterator

Reimplemented from _VDBL_view.

Definition at line 146 of file vdbl_stview.h.

void* _VDBL_standardview::_copy_row_data ( void *  _d  )  const [inline, protected, virtual, inherited]

This function copies the additional data needed by a _row_iterator 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 294 of file vdbl_stview.h.

std::triple<_VDBL_tableid,_VDBL_colid,void*> _VDBL_standardview::_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 next default of a column a _default_iterator. 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. This function destroys the additional data needed by a _default_iterator

Reimplemented from _VDBL_view.

Definition at line 102 of file vdbl_stview.h.

bool _VDBL_standardview::add_visible ( const std::vector< _VDBL_rowid > &  _rs  )  [inline, inherited]

This method adds the row ids in _rs to the visible part of the view.

Definition at line 497 of file vdbl_stview.h.

virtual void _VDBL_standardview::destroy_copy ( _VDBL_view v  )  [inline, virtual, inherited]

clone destructor

Definition at line 391 of file vdbl_stview.h.

virtual void view::destroy_copy ( view v  )  [inline, virtual]

clone destructor

Definition at line 732 of file vdbl_stview.h.

template<class _TR >
bool _VDBL_standardview::get ( const std::pair< _VDBL_tableid, _VDBL_rowid > &  _ri,
const _VDBL_colid _ci,
_TR &  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 _TR.

Definition at line 559 of file vdbl_stview.h.

template<class _TR >
bool view::get ( const rowid _ri,
const char *  _c,
_TR &  r 
) const [inline]

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

Definition at line 764 of file vdbl_stview.h.

template<class _TR >
bool view::get ( const rowid _ri,
const std::string &  _c,
_TR &  r 
) const [inline]

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

Definition at line 759 of file vdbl_stview.h.

template<class _TR >
bool view::get ( const tableid _ti,
const rowid _ri,
const colid _ci,
_TR &  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 _TR.

Definition at line 739 of file vdbl_stview.h.

const col& view::get_raw_col ( const std::pair< tableid, rowid > &  _ri,
const colid _ci,
row const *&  _rr,
bool &  error 
) const [inline]

get a const reference to column _ci in row _ri.second of table _ri.first. If the retrieval was successful, set error to , otherwise to true.

Definition at line 773 of file vdbl_stview.h.

template<class _TR >
bool _VDBL_standardview::get_raw_ptr ( const std::pair< _VDBL_tableid, _VDBL_rowid > &  _ri,
const _VDBL_colid _ci,
_TR 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 _TR. 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 581 of file vdbl_stview.h.

template<class _TR >
bool view::get_raw_ptr ( const tableid _ti,
const rowid _ri,
const colid _ci,
_TR 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 _TR. This only works if the column's data is constant. There is no implicit copying performed.

Definition at line 749 of file vdbl_stview.h.

bool _VDBL_standardview::insert ( const std::vector< _T_colspec > &  _row  )  [inline, inherited]

for now window views can only have one table in the list of tables

Definition at line 412 of file vdbl_stview.h.

virtual _VDBL_view* _VDBL_view::new_copy (  )  const [inline, virtual, inherited]

clone operation clone destructor return the column information for column _C_n. the return value is a reference to the type_info of the column's value type. The reference _r contains upon returning whether the function was successful, the column id, and the column flags. return a reference to the type_info of the column's value type. insert a new row of specification _row into the table, and return the row id of the newly created row in _r. The function returns true, if inserting was successful. remove the row with it _ri from the table return whether the column _C_n is defined in the table return table id and column id of column _C_n return column name of column _C_n return a const reference to the column with column id _ci in row _ri.second of table ri.first. If successful, set error to false, and to true otherwise. Note that in this function the context for the column is NOT set. This method adds the row ids in _rs to the visible part of the view. This method removes the row ids in _rs from the visible part of the view. print the contents of the column with column id _ci in row _ri.second of table ri.first. If the row is empty and no default is defined, print nothing. return a const reference to the row with row id _ri.second of table ri.first. If successful, set error to false, and to true otherwise. return a const reference to the default column with column id _ri.second of table ri.first. If successful, set error to false, and to true otherwise. return iterator to first default column return iterator beyond last default column return iterator to first row return iterator beyond last row return iterator to first column return iterator beyond last column return the type of this view

Definition at line 587 of file vdbl_view.h.

virtual view* view::new_copy (  )  [inline, virtual]

clone operation

Reimplemented from _VDBL_standardview.

Definition at line 728 of file vdbl_stview.h.

std::ostream& _VDBL_standardview::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 of column _ci in row _ri.second of table _ri.first.

Definition at line 536 of file vdbl_stview.h.

bool _VDBL_standardview::rm_visible ( const std::vector< _VDBL_rowid > &  _rs  )  [inline, inherited]

This method removes the row ids in _rs from the visible part of the view.

Definition at line 514 of file vdbl_stview.h.


Member Data Documentation

_V_cols _VDBL_standardview::_V_c [protected, inherited]

This contains all columns of the view

Definition at line 88 of file vdbl_stview.h.

_V_rows _VDBL_standardview::_V_r [protected, inherited]

This contains all rows of the view unless it is a window view

Definition at line 84 of file vdbl_stview.h.


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

Generated on Tue Feb 9 14:59:59 2010 for Vienna Database Library by  doxygen 1.5.8