sptk2 logo
SPTK Home Page

sptk::CDatabaseField Class Reference
[Database Support]

database field More...

#include <CDatabaseField.h>

Inheritance diagram for sptk::CDatabaseField:

sptk::CField sptk::CVariant

List of all members.

Public Member Functions

 CDatabaseField (const std::string fieldName, int fieldColumn, int fieldType, CVariantType dataType, int fieldLength, int fieldScale=4)
bool checkSize (uint32_t sz)
 Checks the internal buffer size.
int fieldColumn () const
 Reports field column number.
int fieldType () const
 Reports database field type.
uint32_t fieldSize () const
 Reports field size.

Public Attributes

std::string displayName
 Column display name.
std::string displayFormat
 Column display format.
int alignment
 Column alignment.
bool visible
 Is column visible?

Protected Attributes

int m_fldType
 Native database data type.
int m_fldColumn
 Field column number in recordset.
int m_fldSize
 Field size.
int m_fldScale
 Field scale, optional, for floating point fields.

Friends

class CQuery
class CDatabase


Detailed Description

database field

A special variation of CField to support database field essentials


Constructor & Destructor Documentation

sptk::CDatabaseField::CDatabaseField ( const std::string  fieldName,
int  fieldColumn,
int  fieldType,
CVariantType  dataType,
int  fieldLength,
int  fieldScale = 4 
)

Constructor

Parameters:
fieldName std::string, field name
fieldColumn int, field column number
fieldType int, database field type
dataType CVariantType, variant data type
fieldLength int, database field length
fieldScale int, database field scale


Member Function Documentation

bool sptk::CDatabaseField::checkSize ( uint32_t  sz  ) 

Checks the internal buffer size.

The internal buffer is automatically extended to fit the required size of data

Parameters:
sz uint32_t, data size (in bytes)
Returns:
true if success


The documentation for this class was generated from the following file:

Mon Mar 5 11:56:07 2012: SPTK 3.5.7