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

RWDBTBuffer<T>

Module:  DB Interface Module   Group:  Open SQL Classes


RWDBTBuffer<T> ...... RWDBAbstractBuffer

Local Index

Members

Synopsis

#include <rw/db/tbuffer.h>

Description

Class RWDBTBuffer<T> encapsulates a fixed-size array of Types. Memory for these Types can be managed by the user or by an RWDBTBuffer<T> itself. In addition, this class keeps a null indicator vector that indicates whether any item in the array is null. The class also provides mechanisms for converting buffer items to and from RWDBValues, if the chosen Type can be converted.

The parameter Type represents the type of object to be inserted into the Type array, either a class or a fundamental data type. The class Type must have:


NOTE -- To create an instance of RWDBTBuffer with the data type RWUString from the Internationalization Module, you must include the header file <rw/db/tbuffer_ustr.h> instead of <rw/db/tbuffer.h>.

Example

Please see Example 1 in the entry for RWDBOSql.

Public Constructors

RWDBTBuffer(RWSize_T entries=1, RWSize_T width=0);

NOTE -- If an invalid value is entered for width, this constructor will ignore it and substitute the default value.
RWDBTBuffer(Type *data, RWSize_T entries=1, 
            RWSize_T width = 0);
RWDBTBuffer(Type *data, RWDBNullIndicator *ni, 
            RWSize_T entries=1, RWSize_T width = 0);

Public Destructor

~RWDBTBuffer();

Public Member Operators

Type& 
operator[](size_t index);
Type 
operator[](size_t index) const;

Public Member Functions

size_t 
entries() const;
bool 
isNull(size_t index) const;
RWDBColumn::ParamType 
paramType() const;
void 
paramType(RWDBColumn::ParamType newType);
void 
setData(const Type& newData);
void 
setData(size_t index, const Type& newData);
void 
setNull();
void 
setNull(size_t index);
void 
unsetNull();
void 
unsetNull(size_t index);


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.