Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWDBTPtrMemTable


RWDBTMemTableBase RWDBTable RWDBTPtrMemTable <T, C> class C

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/db/tpmemtab.h>

RWDBTPtrMemTable<T, C> mt;

Description

This class represents a parameterized memory table. Not only can the type of the object inserted into the memory table be parameterized, but also the implementation.

Parameter T represents the type of the object to be stored in the memory table. It can be a class or a built-in type. The class must have:

Parameter C represents the pointer- based template collection used as the implementation of the memory table. It must have:

Possible choices for C are the Tools.h++ classes RWTPtrSlist and RWTPtrOrderedVector.

The constructors for the class dynamically allocate space for the elements of type T that are placed in the collection. It is the application's responsibility to free this memory when the RWDBTPtrMemTable goes out of scope. An effective way to do this is to have the collection class C call delete on each of the entries in its destructor.

Public Constructors

RWDBTPtrMemTable(size_t maxElements = 0);
RWDBTPtrMemTable(const RWDBSelectorBase& selector,
                 size_t maxElements = 0);
RWDBTPtrMemTable(const RWDBSelectorBase& selector,
                 const RWDBConnection& connection,
                 size_t maxElements = 0);
RWDBTPtrMemTable(const RWDBTable& table,
                 size_t maxElements = 0);
RWDBTPtrMemTable(const RWDBTable& table,
                 const RWDBConnection& connection,
                 size_t maxElements = 0);
RWDBTPtrMemTable(const RWDBReader& reader,
                 size_t maxElements = 0);

Public Member Operator

T*
operator[](size_t index);

Public Member Functions

void
acquire() const;
RWDBColumn
column(const RWCString& name) const; 
RWDBColumn
column(size_t index) const; 
RWDBDatabase
database();
size_t
entries();
RWBoolean
exists(RWBoolean forceLookup = False);
size_t
index(const RWCString& name) const;
size_t
index(const RWDBColumn& column) const;
RWBoolean
isValid() const;
RWCString
name() const;
RWDBTable&
name(RWCString& name);
size_t
numberOfColumns() const;
void
populate(RWDBReader& reader);
RWDBReader
reader() const;
RWDBReader
reader(const RWDBConnection& connection) const;
void
release() const;
RWDBSchema&
schema();
RWDBStatus
status() const;
RWCString
tag() const;
RWDBTable&
tag(const RWCString& name);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.