Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
DB Interface Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWDBTPtrMemTable<T,C>

Module:  DB Interface Module   Group:  Utility and Diagnostics Classes


RWDBTMemTableBase RWDBTable RWDBTPtrMemTable <T, C> class C

Local Index

Members

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 classes RWTPtrSlist and RWTPtrOrderedVector of the Essential Tools Module.

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();
bool
exists(bool forceLookup = False);
size_t
index(const RWCString& name) const;
size_t
index(const RWDBColumn& column) const;
bool
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 DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.