standard_table Class Reference
[Classes and types for external use]

standard table of a database More...

#include <vdbl_table.h>

Inheritance diagram for standard_table:

Inheritance graph
[legend]
Collaboration diagram for standard_table:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair< std::string,
_VDBL_col
_T_colspec
typedef std::pair< const
std::string *, const _VDBL_col * > 
_T_ptrcolspec
typedef _Base::col_const_iterator col_const_iterator
typedef _row_iterator
< _VDBL_rowid, const
_VDBL_rowid &, const
_VDBL_rowid * > 
row_const_iterator

Public Member Functions

 standard_table ()
 standard_table (const standard_table &__t)
template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
 standard_table (const __SequenceCtr< std::triple< std::string, _VDBL_col, _VDBL_colflags >, Allocator1 > &__cc)
virtual ~standard_table ()
virtual standard_tablenew_copy ()
virtual void destroy_copy (standard_table *t)
bool insert (const std::vector< _T_ptrcolspec > &_row, rowid &_ri)
bool insert (const std::vector< _T_ptrcolspec > &_row)
template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool insert_row (const __SequenceCtr< col_spec, Allocator1 > &_row, rowid &_ri)
template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool insert_row (const __SequenceCtr< col_spec, Allocator1 > &_row)
template<template< class __Tp1, class __AllocTp1 > class __SequenceCtrOut, template< class __Tp2, class __AllocTp2 > class __SequenceCtrIn, class AllocatorOut , class AllocatorIn >
bool insert_row (const __SequenceCtrOut< __SequenceCtrIn< col_spec, AllocatorIn >, AllocatorOut > &_rows)
bool update (const std::vector< _T_ptrcolspec > &_row, _VDBL_rowid &_ri)
template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool update_row (const __SequenceCtr< col_spec, Allocator1 > &_row, rowid &_ri)
const rowget_row (const rowid &_ri, bool &error) const
const rowget_row_ptr (const rowid &_ri) const
rowget_row (const rowid &_ri, bool &error)
std::string get_colname (const colid &_C_i) const
row_const_iterator row_begin () const
row_const_iterator row_end () const
const std::type_info & get_colinfo (const std::string &_C_n, std::triple< bool, _VDBL_colid, _VDBL_colflags > &_r) const
_VDBL_colid get_col_id (const std::string &_C_n) const
std::string get_col_name (const _VDBL_colid &_C_id) const
virtual _VDBL_tablenew_copy () VDBL_PURE_VIRTUALvirtual void destroy_copy(_VDBL_table *t) VDBL_PURE_VIRTUALvirtual bool add_col(const std
virtual void destroy_copy (_VDBL_table *t)
template<class _VALclass >
bool retrieve (const _VDBL_rowid &_r, const _VDBL_colid &_c, const _VDBL_context *_ctx, _VALclass *&_val) const
std::pair< std::string,
_VDBL_colid
_next_col (const std::pair< std::string, _VDBL_colid > &_ci) const
_VDBL_rowid _next_row (const _VDBL_rowid &_ci) const
template<template< class __Tp1, class __AllocTp1 > class __SequenceCtrOut, template< class __Tp2, class __AllocTp2 > class __SequenceCtrIn, class AllocatorOut , class AllocatorIn >
bool insert_row (const __SequenceCtrOut< __SequenceCtrIn< _T_colspec, AllocatorIn >, AllocatorOut > &_rows)
template<class _CB >
bool add_col (const char *_C_n, const _CB &__c, const _VDBL_colflags &__f)
template<class _CB >
bool add_col (const std::string &_C_n, const _CB &__c, const _VDBL_colflags &__f)
colid get_colid (const std::string &_C_n) const
colid get_colid (const char *_C_n) const

Protected Member Functions

void made_change ()
_VDBL_colid get_colid ()
_VDBL_rowid get_rowid ()


Detailed Description

This class describes the standard table of a database, consisting of rows and columns.

Definition at line 1317 of file vdbl_table.h.


Member Typedef Documentation

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

specifier of one column, a pair of column name (string) and entry (_VDBL_col).

Reimplemented from _VDBL_table.

Definition at line 591 of file vdbl_table.h.

typedef std::pair<const std::string*,const _VDBL_col*> _VDBL_standardtable::_T_ptrcolspec [inherited]

specifier of pointers to one column, a pair of column name (string*) and entry (_VDBL_col*).

Reimplemented from _VDBL_table.

Definition at line 596 of file vdbl_table.h.

const iterator over all columns

Reimplemented from _VDBL_table.

Definition at line 601 of file vdbl_table.h.

const iterator over all rows

Definition at line 321 of file vdbl_table.h.


Constructor & Destructor Documentation

standard_table::standard_table (  )  [inline]

standard constructor

Definition at line 1330 of file vdbl_table.h.

standard_table::standard_table ( const standard_table __t  )  [inline]

copy constructor

Definition at line 1334 of file vdbl_table.h.

template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
standard_table::standard_table ( const __SequenceCtr< std::triple< std::string, _VDBL_col, _VDBL_colflags >, Allocator1 > &  __cc  )  [inline]

constructor defining a table using a list of columns. This list can be contained in any STL sequence container.

Definition at line 1342 of file vdbl_table.h.

virtual standard_table::~standard_table (  )  [inline, virtual]

standard destructor

Definition at line 1348 of file vdbl_table.h.


Member Function Documentation

std::pair<std::string,_VDBL_colid> _VDBL_standardtable::_next_col ( const std::pair< std::string, _VDBL_colid > &  _ci  )  const [inline, virtual, inherited]

This virtual function has to be overloaded by the derived table classes, and it performs the step to the next column for a _col_iterator. This virtual function has to be overloaded by the derived table classes, and it performs the step to the previous column for a _col_iterator. return iterator to first column return iterator beyond last column This is the fundamental class for iterators over all rows, defining basic in(de)crementation for overloading, and basic comparison.

Reimplemented from _VDBL_table.

Definition at line 1174 of file vdbl_table.h.

_VDBL_rowid _VDBL_standardtable::_next_row ( const _VDBL_rowid _ci  )  const [inline, virtual, inherited]

This virtual function has to be overloaded by the derived table classes, and it performs the step to the next row for a _col_iterator. This virtual function has to be overloaded by the derived table classes, and it performs the step to the previous row for a _col_iterator. return iterator to first row return iterator beyond last row construct a new copy of a row iterator standard constructor

Reimplemented from _VDBL_table.

Definition at line 1209 of file vdbl_table.h.

template<class _CB >
bool standard_table::add_col ( const std::string &  _C_n,
const _CB &  __c,
const _VDBL_colflags __f 
) [inline]

add a new column of name _C_n, with data __c, and column flags __f. The function returns true, if adding the column was successful.

Definition at line 1371 of file vdbl_table.h.

template<class _CB >
bool standard_table::add_col ( const char *  _C_n,
const _CB &  __c,
const _VDBL_colflags __f 
) [inline]

add a new column of name _C_n, with data __c, and column flags __f. The function returns true, if adding the column was successful.

Definition at line 1367 of file vdbl_table.h.

virtual void _VDBL_standardtable::destroy_copy ( _VDBL_table t  )  [inline, virtual, inherited]

clone destructor method

Definition at line 717 of file vdbl_table.h.

virtual void standard_table::destroy_copy ( standard_table t  )  [inline, virtual]

clone destructor method

Definition at line 1358 of file vdbl_table.h.

_VDBL_colid _VDBL_standardtable::get_col_id ( const std::string &  _C_n  )  const [inline, inherited]

return the column id of column _C_n

Definition at line 637 of file vdbl_table.h.

std::string _VDBL_standardtable::get_col_name ( const _VDBL_colid _C_id  )  const [inline, inherited]

return the column name of column _C_id

Definition at line 650 of file vdbl_table.h.

_VDBL_colid _VDBL_table::get_colid (  )  [inline, protected, inherited]

generate new unique id's for rows and columns

Definition at line 99 of file vdbl_table.h.

colid standard_table::get_colid ( const char *  _C_n  )  const [inline]

return the column id of column _C_n

Definition at line 1506 of file vdbl_table.h.

colid standard_table::get_colid ( const std::string &  _C_n  )  const [inline]

return the column id of column _C_n

Definition at line 1503 of file vdbl_table.h.

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

return the column information for column _C_n. the return value is a referenc 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. what was the id of the last change to the table

Reimplemented from _VDBL_table.

Definition at line 614 of file vdbl_table.h.

std::string standard_table::get_colname ( const colid _C_i  )  const [inline]

return the column name of column _C_n

Definition at line 1513 of file vdbl_table.h.

row& standard_table::get_row ( const rowid _ri,
bool &  error 
) [inline]

return a reference to the row with id _ri. If an error occurs, set error to true, otherwise to false.

Definition at line 1496 of file vdbl_table.h.

const row& standard_table::get_row ( const rowid _ri,
bool &  error 
) const [inline]

return a const reference to the row with id _ri. If an error occurs, set error to true, otherwise to false.

Definition at line 1482 of file vdbl_table.h.

const row* standard_table::get_row_ptr ( const rowid _ri  )  const [inline]

return a const pointer to the row with id _ri. If an error occurs, return NULL

Definition at line 1489 of file vdbl_table.h.

_VDBL_rowid _VDBL_table::get_rowid (  )  [inline, protected, inherited]

generate new unique id's for rows and columns

Definition at line 100 of file vdbl_table.h.

bool standard_table::insert ( const std::vector< _T_ptrcolspec > &  _row  )  [inline]

insert a new row of specification _row into the table. The function returns true, if inserting was successful.

Reimplemented from _VDBL_standardtable.

Definition at line 1388 of file vdbl_table.h.

bool standard_table::insert ( const std::vector< _T_ptrcolspec > &  _row,
rowid _ri 
) [inline]

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.

Definition at line 1381 of file vdbl_table.h.

template<template< class __Tp1, class __AllocTp1 > class __SequenceCtrOut, template< class __Tp2, class __AllocTp2 > class __SequenceCtrIn, class AllocatorOut , class AllocatorIn >
bool _VDBL_table::insert_row ( const __SequenceCtrOut< __SequenceCtrIn< _T_colspec, AllocatorIn >, AllocatorOut > &  _rows  )  [inline, inherited]

insert a many new rows of specifications _rows into the table. The list of rows can be contained in any sequential STL container, which holds any other sequential STL container of column entries. The function returns true, if inserting was successful for all rows.

Definition at line 473 of file vdbl_table.h.

template<template< class __Tp1, class __AllocTp1 > class __SequenceCtrOut, template< class __Tp2, class __AllocTp2 > class __SequenceCtrIn, class AllocatorOut , class AllocatorIn >
bool standard_table::insert_row ( const __SequenceCtrOut< __SequenceCtrIn< col_spec, AllocatorIn >, AllocatorOut > &  _rows  )  [inline]

insert a many new rows of specifications _rows into the table. The list of rows can be contained in any sequential STL container, which holds any other sequential STL container of column entries. The function returns true, if inserting was successful for all rows.

Definition at line 1434 of file vdbl_table.h.

template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool standard_table::insert_row ( const __SequenceCtr< col_spec, Allocator1 > &  _row  )  [inline]

insert a new row of specification _row into the table. Take any sequential STL container to hold the row entries of the column. The function returns true, if inserting was successful.

Definition at line 1418 of file vdbl_table.h.

template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool standard_table::insert_row ( const __SequenceCtr< col_spec, Allocator1 > &  _row,
rowid _ri 
) [inline]

insert a new row of specification _row into the table, and return the row id of the newly created row in _r. Take any sequential STL container to hold the row entries of the column. The function returns true, if inserting was successful.

Definition at line 1400 of file vdbl_table.h.

void _VDBL_table::made_change (  )  [inline, protected, inherited]

increment the last_change counter.

Definition at line 106 of file vdbl_table.h.

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

clone method clone destructor method add a new column of name _C_n, which contains __c, and has column flags __f. The function returns true, if adding the column was successful. modify the column of name _C_n, to new contents __c, and new column flags __f. The function returns true, if modifying was successful. modify the contents of column of name _C_n The function returns true, if modifying was successful. modify the column flags of column of name _C_n The function returns true, if modifying was successful. remove the column _C_n from the table The function returns true, if erasing was successful. rename the column _C_old to new name _C_new. The function returns true, if renaming was successful. 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. insert a new row of specification _row into the table. The function returns true, if inserting was successful. insert a new row of specification _row into the table, and return the row id of the newly created row in _r. Take any sequential STL container to hold the row entries of the column. The function returns true, if inserting was successful.

Definition at line 380 of file vdbl_table.h.

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

clone method

Reimplemented from _VDBL_standardtable.

Definition at line 1353 of file vdbl_table.h.

template<class _VALclass >
bool _VDBL_standardtable::retrieve ( const _VDBL_rowid _r,
const _VDBL_colid _c,
const _VDBL_context _ctx,
_VALclass *&  _val 
) const [inline, inherited]

retrieve the value of column (id = _c) in row (id = _r) under evaluation context _ctx to _val. Return whether retrieval was successful. If there is no defined value in row _r for column _c, then return the default value of column _c, if defined.

Definition at line 1105 of file vdbl_table.h.

row_const_iterator standard_table::row_begin (  )  const [inline]

return iterator to first row

Reimplemented from _VDBL_standardtable.

Definition at line 1519 of file vdbl_table.h.

row_const_iterator standard_table::row_end (  )  const [inline]

return iterator beyond last row

Reimplemented from _VDBL_standardtable.

Definition at line 1523 of file vdbl_table.h.

bool standard_table::update ( const std::vector< _T_ptrcolspec > &  _row,
_VDBL_rowid _ri 
) [inline]

update the row with row id _r to the new of specification _row The function returns true, if updating was successful. The function returns true if updating was successful.

Reimplemented from _VDBL_standardtable.

Definition at line 1453 of file vdbl_table.h.

template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1 >
bool standard_table::update_row ( const __SequenceCtr< col_spec, Allocator1 > &  _row,
rowid _ri 
) [inline]

update the row with row id _r to the new of specification _row The function returns true, if updating was successful. The function returns true if updating was successful. Take any sequential STL container to hold the row entries of the column. The function returns true, if inserting was successful.

Definition at line 1468 of file vdbl_table.h.


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

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