simpleRDBTable< Type > Class Template Reference

#include <simpleRDBTable.h>

Inheritance diagram for simpleRDBTable< Type >:

Inheritance graph
[legend]
Collaboration diagram for simpleRDBTable< Type >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 simpleRDBTable (const string &fname, const int mode, const char *header[]) throw ( Exception )
void print (ostream &os) const
Type * readRow () throw ( Exception )
 Read a row of the RDB table.

Static Public Member Functions

static void getData (RDBColumn *rdbcol, string &val) throw ( Exception )
 Given an RDBColumn, get a string value.
static void getData (RDBColumn *rdbcol, int &val) throw ( Exception )
 Given an RDBColumn, get an integer value.
static void getData (RDBColumn *rdbcol, long &val) throw ( Exception )
 Given an RDBColumn, get a long value.
static void getData (RDBColumn *rdbcol, double &val) throw ( Exception )
 Given an RDBColumn, get a double value.

Protected Attributes

const char ** rdb_header
RDBColumn ** rdb_column

Friends

ostream & operator<< (ostream &os, simpleRDBTable< Type > &a)
ostream & operator<< (ostream &os, simpleRDBTable< Type > *a)


Detailed Description

template<class Type>
class simpleRDBTable< Type >

A simple interface to the RDB++ read a row of an rdb table to initialize a class Type. The class Type must have a constructor with the following prototype:

Type( const char* header[], RDBColumn** rdb_column ) throw( Exception )

Definition at line 48 of file simpleRDBTable.h.


Member Function Documentation

template<class Type>
void simpleRDBTable< Type >::getData ( RDBColumn rdbcol,
string &  val 
) throw ( Exception ) [inline, static]

Given an RDBColumn, get a string value.

Definition at line 86 of file simpleRDBTable.cc.

template<class Type>
void simpleRDBTable< Type >::getData ( RDBColumn rdbcol,
int &  val 
) throw ( Exception ) [inline, static]

Given an RDBColumn, get an integer value.

Definition at line 98 of file simpleRDBTable.cc.

template<class Type>
void simpleRDBTable< Type >::getData ( RDBColumn rdbcol,
long &  val 
) throw ( Exception ) [inline, static]

Given an RDBColumn, get a long value.

Definition at line 122 of file simpleRDBTable.cc.

template<class Type>
void simpleRDBTable< Type >::getData ( RDBColumn rdbcol,
double &  val 
) throw ( Exception ) [inline, static]

Given an RDBColumn, get a double value.

Definition at line 145 of file simpleRDBTable.cc.

template<class Type>
Type * simpleRDBTable< Type >::readRow (  )  throw ( Exception ) [inline]

Read a row of the RDB table.

Definition at line 191 of file simpleRDBTable.cc.

References RDB::_isptr, and RDB::read().


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

Generated on Tue Sep 15 11:07:33 2009 for rdbxx by  doxygen 1.5.6