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

_VDBL_table Class Reference
[Classes and types for internal use]

the base class describing database tables More...

#include <vdbl_table.h>

Inheritance diagram for _VDBL_table:

Inheritance 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 _col_iterator< std::pair<
std::string, _VDBL_colid >,
const std::pair< std::string,
_VDBL_colid > &, const std::pair<
std::string, _VDBL_colid > * > 
col_const_iterator
typedef _row_iterator< _VDBL_rowid,
const _VDBL_rowid &, const
_VDBL_rowid * > 
row_const_iterator

Public Methods

virtual const std::type_info & get_colinfo (const std::string &_C_n, triple< bool, _VDBL_colid, _VDBL_colflags > &_r) const VDBL_PURE_VIRTUAL public
virtual std::pair< std::string,
_VDBL_colid
_next_col (const std::pair< std::string, _VDBL_colid > &_ci) const VDBL_PURE_VIRTUAL virtual std
virtual _VDBL_rowid _next_row (const _VDBL_rowid &_ci) const VDBL_PURE_VIRTUAL virtual _VDBL_rowid _prev_row(const _VDBL_rowid &_ci) const VDBL_PURE_VIRTUAL virtual row_ const _iterator row_begin() const VDBL_PURE_VIRTUAL virtual row_ const _iterator row_end() const VDBL_PURE_VIRTUAL public
 _VDBL_table (const _VDBL_table &__t)
template<template< class __Tp, class __AllocTp > class __SequenceCtr, class Allocator1>  _VDBL_table (const __SequenceCtr< triple< std::string, _VDBL_col, _VDBL_colflags >, Allocator1 > &__cc)
virtual ~_VDBL_table ()
virtual bool add_col (const std::string &_C_n, const _VDBL_col &__c, const _VDBL_colflags &__f) VDBL_PURE_VIRTUAL virtual bool modify_col(const std
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)

Protected Methods

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

Detailed Description

This is the base class of all tables within a database. A table is defined by a set of columns, which can be added and removed dynamically. The columns might have default values. Those are stored with the table, as well. The columns all consist of objects of class _VDBL_col.

The whole table then consists of a set of rows (_VDBL_row objects), organized in a map rowid -> row.

Definition at line 67 of file vdbl_table.h.


Member Typedef Documentation

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

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

Reimplemented in _VDBL_standardtable, and _VDBL_viewtable.

Definition at line 77 of file vdbl_table.h.

typedef std::pair<const std::string*,const _VDBL_col*> _VDBL_table::_T_ptrcolspec
 

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

Reimplemented in _VDBL_standardtable.

Definition at line 82 of file vdbl_table.h.

typedef _col_iterator<std::pair<std::string,_VDBL_colid>, const std::pair<std::string,_VDBL_colid>&, const std::pair<std::string,_VDBL_colid>*> _VDBL_table::col_const_iterator
 

const iterator over all columns

Reimplemented in _VDBL_standardtable.

Definition at line 213 of file vdbl_table.h.

typedef _row_iterator<_VDBL_rowid, const _VDBL_rowid&, const _VDBL_rowid*> _VDBL_table::row_const_iterator
 

const iterator over all rows

Definition at line 320 of file vdbl_table.h.


Constructor & Destructor Documentation

_VDBL_table::_VDBL_table const _VDBL_table &    __t [inline]
 

copy constructor

Definition at line 353 of file vdbl_table.h.

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

constructor which builds a table from a list of column definitions. This list can be contained in any sequential STL container.

Definition at line 362 of file vdbl_table.h.

virtual _VDBL_table::~_VDBL_table   [inline, virtual]
 

standard destructor

Definition at line 369 of file vdbl_table.h.


Member Function Documentation

virtual std::pair<std::string,_VDBL_colid> _VDBL_table::_next_col const std::pair< std::string, _VDBL_colid > &    _ci const [inline, virtual]
 

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

Reimplemented in _VDBL_standardtable.

Definition at line 220 of file vdbl_table.h.

virtual _VDBL_rowid _VDBL_table::_next_row const _VDBL_rowid   _ci const [inline, virtual]
 

standard constructor

Reimplemented in _VDBL_standardtable.

Definition at line 327 of file vdbl_table.h.

virtual bool _VDBL_table::add_col const std::string &    _C_n,
const _VDBL_col   __c,
const _VDBL_colflags   __f
const [inline, virtual]
 

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 376 of file vdbl_table.h.

_VDBL_colid _VDBL_table::get_colid   [inline, protected]
 

generate new unique id's for rows and columns

Definition at line 98 of file vdbl_table.h.

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

what was the id of the last change to the table

Reimplemented in _VDBL_standardtable.

Definition at line 115 of file vdbl_table.h.

_VDBL_rowid _VDBL_table::get_rowid   [inline, protected]
 

generate new unique id's for rows and columns

Definition at line 99 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]
 

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 457 of file vdbl_table.h.

void _VDBL_table::made_change   [inline, protected]
 

increment the last_change counter.

Definition at line 105 of file vdbl_table.h.


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