Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

fbwrap::FieldList Class Reference

A list of fields. More...

#include <FBwFieldList.h>

List of all members.

Public Methods

 FieldList (FBwDb *pdb)
 Constructor.

void Add (FBwField *pfld)
 Add a field to the list.

FBwFieldFindField (int idx) const
 Find field in position idx.

FBwFieldFindField (string fname) const
 Find field with name fname.

FBwFieldoperator[] (int idx) const
 Finds the field at index idx.

FBwFieldoperator[] (string fldname) const
 Finds the field with name fldname.

void DestroyFields ()
 Delete all fields of the list.

void CreateFrom (XSQLDA *xsql)
void CreateFrom (const FieldList &fl, int from=0, int to=-1)
void BindParams (XSQLDA *xsql)
 Binding a param list with input XSQLDA.

FBwFieldCreateField (XSQLVAR &xv, int i)
 Create a field from a XSQLVAR.

void ConvertStoV ()
 Changes from Firebird to fbwrap representation of value.

void ConvertVtoS ()
 Changes from fbwrap to Firebird representation of value.

 ~FieldList ()
 Destructor.

bool IsEmpty ()
int Count () const
 < Returns the number of fields in the list

void SetDb (FBwDb *pdb)
FieldList & operator= (const FieldList &f)
 FieldList copy operator.

void CopyByName (const FieldList &p)
 Value copy from another FieldList by field name.

void CopyByIdx (const FieldList &p, int tfrom, int sfrom, int to)
void SetAllNull ()
 Set all fields to NULL.

void SetUnasigned ()
 Set all fields as unasigned.

int ByteLen ()
 returns bytelen of field

void Write (char *p)
 write field to buffer p

void Read (char *p)
 read field from buffer p


Friends

FieldList & operator<< (FieldList &f, const string &s)
 string insertion

FieldList & operator<< (FieldList &f, const char *s)
 char * insertion

FieldList & operator<< (FieldList &f, const FBwDate &d)
 FBwDate insertion.

FieldList & operator<< (FieldList &f, const FBwTime &t)
 FBwTime insertion.

FieldList & operator<< (FieldList &f, const FBwDateTime &dt)
 FBwDateTime insertion.

FieldList & operator<< (FieldList &f, int i)
 int insertion

FieldList & operator<< (FieldList &f, long long int i)
 long long int insertion

FieldList & operator<< (FieldList &f, double d)
 double insertion

FieldList & operator<< (FieldList &f, const FieldListIndex &idx)
 Changes internal field index, regard it as a manipulator.


Detailed Description

A list of fields.

This class replaces notion of table record, it holds a set of FBwField pointers wich receives data from table or view and are responsible for convertions from database representation to c++ representation of data. A field list can be created from a XSQLDA for exchanging data with fierebird. Also a parameter FieldList can be created for querys with input parameters. Has facilities for copy between field lists based on field order or field names ( remember old cobol MOVE CORRESPONDING! ).

The list has an implicit FieldListIndex wich points to the next field modified by an insertion operator<<. After the insertion the index is incremented and folded to zero when field Count() has been reached. You can alter the order of insertion by inserting a FieldListIndex object with the position you want.


Constructor & Destructor Documentation

fbwrap::FieldList::FieldList FBwDb   pdb [inline]
 

Constructor.

Parameters:
pdb:  Database


Member Function Documentation

void fbwrap::FieldList::CopyByName const FieldList &    p
 

Value copy from another FieldList by field name.

Value Copy By name Value Copy By Index

void fbwrap::FieldList::CreateFrom XSQLDA *    xsql
 

Creates a FieldsList from XSQLDA Creates a FieldsList from another fieldList

void fbwrap::FieldList::SetDb FBwDb   pdb [inline]
 

Parameters:
pdb  Set FieldList database to pdb


The documentation for this class was generated from the following files:
Generated on Fri Jan 31 08:30:06 2003 for fbwrap by doxygen1.2.17