dbContainer Class Template Reference

#include <container.h>

Inheritance diagram for dbContainer:

dbAnyContainer dbAnyReference

List of all members.


Detailed Description

template<class T>
class dbContainer< T >

Template of container for particular table.

Public Member Functions

int search (dbCursor< T > &cursor, void const *from, void const *till)
 Search records matching search criteria (between, less or equal, great or equal).
int search (dbCursor< T > &cursor, void const *key)
 Select records with specified value of the key.
int prefixSearch (dbCursor< T > &cursor, char const *key)
 Select records which indexed field is prefix of specfied key.
int search (dbCursor< T > &cursor)
 Select all records in the container.
int spatialSearch (dbCursor< T > &cursor, rectangle const &r, SpatialSearchType type)
 Perform spatial search using R-Tree.
void create ()
 Create new container.
void purge ()
 Clear the container.
void free ()
 Deallocate container.
void add (dbReference< T > const &ref)
 Add new record to container.
void remove (dbReference< T > const &ref)
 Remove record from the container.
 dbContainer (const char *fieldName)
 Constructor of the contanier reference.
void create (dbDatabase *db)
 Create new container in specified database.
void purge (dbDatabase *db)
 Clear the container in specified database.
void free (dbDatabase *db)
 Deallocate container in specified database.
void add (dbDatabase *db, dbReference< T > const &ref)
 Add new record to container in specified database.
void remove (dbDatabase *db, dbReference< T > const &ref)
 Remove record from the container in specified database.
 dbContainer (dbDatabase *db, const char *fieldName)
 Constructor of the contanier reference.

Constructor & Destructor Documentation

dbContainer ( const char *  fieldName  )  [inline]

Constructor of the contanier reference.

Parameters:
fieldName name of the key field used by container

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

int 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

int 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

int 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

int search ( dbCursor< T > &  cursor  )  [inline]

Select all records in the container.

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

int 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

void create (  )  [inline]

Create new container.

void purge (  )  [inline]

Clear the container.

void free (  )  [inline]

Deallocate container.

void add ( dbReference< T > const &  ref  )  [inline]

Add new record to container.

Parameters:
ref reference to the record added to the container

void remove ( dbReference< T > const &  ref  )  [inline]

Remove record from the container.

Parameters:
ref reference to the record deleted from the container

void create ( dbDatabase db  )  [inline]

Create new container in specified database.

Parameters:
db database

Reimplemented from dbAnyContainer.

void purge ( dbDatabase db  )  [inline]

Clear the container in specified database.

Parameters:
db database

Reimplemented from dbAnyContainer.

void free ( dbDatabase db  )  [inline]

Deallocate container in specified database.

Parameters:
db database

Reimplemented from dbAnyContainer.

void 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

void 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


Online Library Docs

sipXecs home page

Version 4.2.1-018930 2010-07-31T01:13:23 build16 abuild