Main Page   Class Hierarchy   Compound List   File List   Compound Members  

dbContainer< T > Class Template Reference

#include <container.h>

Inheritance diagram for dbContainer< T >:

dbAnyContainer dbAnyReference List of all members.

Public Methods

int search (dbCursor< T > &cursor, void const *from, void const *till)
int search (dbCursor< T > &cursor, void const *key)
int prefixSearch (dbCursor< T > &cursor, char const *key)
int search (dbCursor< T > &cursor)
int spatialSearch (dbCursor< T > &cursor, rectangle const &r, SpatialSearchType type)
void create ()
void purge ()
void free ()
void add (dbReference< T > const &ref)
void remove (dbReference< T > const &ref)
 dbContainer (const char *fieldName)
void create (dbDatabase *db)
void purge (dbDatabase *db)
void free (dbDatabase *db)
void add (dbDatabase *db, dbReference< T > const &ref)
void remove (dbDatabase *db, dbReference< T > const &ref)
 dbContainer (dbDatabase *db, const char *fieldName)
oid_t getOid () const
bool isNull () const

Friends

bool isNull (dbAnyReference const &ref)

Detailed Description

template<class T>
class dbContainer< T >

Template of container for particular table


Constructor & Destructor Documentation

template<class T>
dbContainer< T >::dbContainer const char *    fieldName [inline]
 

Constructor of the contanier reference

Parameters:
fieldName  name of the key field used by container

template<class T>
dbContainer< T >::dbContainer dbDatabase   db,
const char *    fieldName
[inline]
 

Constructor of the contanier reference

Parameters:
db  database
fieldName  name of the key field used by container


Member Function Documentation

template<class T>
void dbContainer< T >::add dbDatabase   db,
dbReference< T > const &    ref
[inline]
 

Add new record to container in specified database.

Parameters:
db  database
ref  reference to the record added to the container

template<class T>
void dbContainer< T >::add dbReference< T > const &    ref [inline]
 

Add new record to container

Parameters:
ref  reference to the record added to the container

template<class T>
void dbContainer< T >::create dbDatabase   db [inline]
 

Create new container in specified database.

Parameters:
db  database

Reimplemented from dbAnyContainer.

template<class T>
void dbContainer< T >::create   [inline]
 

Create new container.

template<class T>
void dbContainer< T >::free dbDatabase   db [inline]
 

Deallocate container in specified database.

Parameters:
db  database

Reimplemented from dbAnyContainer.

template<class T>
void dbContainer< T >::free   [inline]
 

Deallocate container

oid_t dbAnyReference::getOid   const [inline, inherited]
 

Get object idetifier

Returns:
object identifier of referenced object

bool dbAnyReference::isNull   const [inline, inherited]
 

Check whether reference is null

template<class T>
int dbContainer< T >::prefixSearch dbCursor< T > &    cursor,
char const *    key
[inline]
 

Select records which indexed field is prefix of specfied key

Parameters:
cursor  cursor to iterate through selected resords
key  string key which prefixes are located in the index
Returns:
number of selected records

template<class T>
void dbContainer< T >::purge dbDatabase   db [inline]
 

Clear the container in specified database.

Parameters:
db  database

Reimplemented from dbAnyContainer.

template<class T>
void dbContainer< T >::purge   [inline]
 

Clear the container

template<class T>
void dbContainer< T >::remove dbDatabase   db,
dbReference< T > const &    ref
[inline]
 

Remove record from the container in specified database.

Parameters:
db  database
ref  reference to the record deleted from the container

template<class T>
void dbContainer< T >::remove dbReference< T > const &    ref [inline]
 

Remove record from the container

Parameters:
ref  reference to the record deleted from the container

template<class T>
int dbContainer< T >::search dbCursor< T > &    cursor [inline]
 

Select all records in the container

Parameters:
cursor  cursor to iterate through selected resords
Returns:
number of selected records

template<class T>
int dbContainer< T >::search dbCursor< T > &    cursor,
void const *    key
[inline]
 

Select records with specified value of the key

Parameters:
cursor  cursor to iterate through selected resords
key  searched value of the key
Returns:
number of selected records

template<class T>
int dbContainer< T >::search dbCursor< T > &    cursor,
void const *    from,
void const *    till
[inline]
 

Search records matching search criteria (between, less or equal, great or equal)

Parameters:
cursor  cursor to iterate through selected resords
from  inclusive low bound for the search key, if NULL then there is no low bound
till  inclusive high bound for the search key, if NULL then there is no high bound
Returns:
number of selected records

template<class T>
int dbContainer< T >::spatialSearch dbCursor< T > &    cursor,
rectangle const &    r,
SpatialSearchType    type
[inline]
 

Perform spatial search using R-Tree

Parameters:
cursor  cursor to iterate through selected resords
r  search rectangle
type  search criteria: one of SpatialSearchType
Returns:
number of selected records


Friends And Related Function Documentation

bool isNull dbAnyReference const &    ref [friend, inherited]
 

Check whether reference is null


The documentation for this class was generated from the following file:
Generated on Mon Oct 23 13:23:59 2006 for FastDB by doxygen1.2.18