Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dbField Class Reference
[OOFILE Database package]

#include <oof3.h>

Inheritance diagram for dbField:

Inheritance graph
[legend]
Collaboration diagram for dbField:

Collaboration graph
[legend]
List of all members.

Detailed Description

Base class for persistent fields in dbTable's.

Subclasses prefixed by "oof", eg: oofDate are not persistent and allow you to use local variables that match the other OOFILE typing. eg: you may want a local variable included in a dbView fed to oofRep or linked to a form with dbEditHelper.


Public Types

enum  FieldIsStandaloneT { eFieldIsStandalone }
enum  { kKeyLengthAutoCalculated = USHRT_MAX }

Public Member Functions

 dbField (const OOF_IndexOptions)
 dbField (const char *fieldName=0)
 dbField (const char *fieldName, const OOF_IndexOptions)
 dbField (const dbField &)
 dbField (FieldIsStandaloneT)
virtual ~dbField ()
virtual dbFieldclone () const=0
virtual void postCloneTableCleanup ()
virtual oofString name () const
void index (const OOF_IndexOptions=kIndexed)
void indexPartialKeyLen (unsigned short)
void setName (const char *name)
bool hasDefaultCalculator () const
void useCalculatorOnlyForDefaults ()
bool storesCalculatedValues () const
void storeCalculatedValues ()
bool usingCalculator () const
const char * tableName () const
bool fieldIsStandalone () const
virtual bool fieldIsSameTypeAs (const dbField *) const
virtual void describe (std::ostream &) const
 Provide human-readable information about object.

virtual OOF_fieldTypes fieldType () const=0
virtual OOF_fieldTypes nativeType () const
virtual unsigned long fieldStorageLen () const=0
virtual unsigned long fieldMinWrapWidth () const
virtual unsigned long fieldUsualWrapWidth () const
dbTablefieldTable () const
unsigned long fieldDataLen () const
virtual bool isEmpty () const
bool isDirty () const
fieldNumT fieldNumber () const
virtual const oofStringfieldName () const
OOF_IndexOptions fieldIndexOptions () const
bool fieldIndexIgnoresNulls () const
bool fieldIndexIsCompressLeading () const
bool fieldIndexIsCompressPadding () const
virtual bool fieldIsIndexed () const
bool fieldIsPartiallyIndexed () const
virtual bool fieldIsKeywordIndexed () const
virtual bool fieldIsUniqueIndexed () const
unsigned short fieldNumIndexes () const
unsigned short fieldKeyLen () const
bool caseSensitive () const
virtual bool fieldIsBlob () const
virtual bool fieldIsBinary () const
virtual bool fieldIsVirtual () const
dbFieldequivalentFieldFromTable (dbTable *) const
bool valueIsDuplicate () const
virtual dbQueryClausevalueAsQueryLiteral () const
bool fieldIsJoinKey () const
 Checks if any relationships in field's table use field as join key.

virtual void clear ()
virtual void setString (const char *)
virtual void setNumber (long)
void operator= (const char *)
virtual oofString copyString () const
virtual void getChars (char *ioBuff, unsigned long &outLen) const
virtual const char * asChars () const
virtual void extract (std::ostream &) const
virtual bool insert (std::istream &, char fieldSep, char recSep)
virtual void copyValueFrom (const dbField *)
virtual void copyValueIfDifferent (const dbField *)
virtual bool validateContents ()
virtual oofWordParserwords () const
void saveDefaultCalculatedValue ()
void saveStoredCalculatedValue ()
virtual void generateTestData (bool, unsigned long)
bool hidden () const
void hide (bool hideIt=true)

Protected Member Functions

void CalculateWith (dbCalculator *adoptedCalculator, bool useOnlyForDefaults)
virtual void CopyCalculatedValueToBuffer ()

Protected Attributes

OOF_tableBackendmBackend
dbTablemTable
fieldNumT mFieldNumber
dbCalculatormCalculator
bool mHidden

Friends

class dbTable


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
kKeyLengthAutoCalculated 

enum dbField::FieldIsStandaloneT
 

Enumeration values:
eFieldIsStandalone 


Constructor & Destructor Documentation

dbField::dbField const  OOF_IndexOptions  ) 
 

dbField::dbField const char *  fieldName = 0  ) 
 

dbField::dbField const char *  fieldName,
const  OOF_IndexOptions
 

dbField::dbField const dbField  ) 
 

dbField::dbField FieldIsStandaloneT   ) 
 

dbField::~dbField  )  [virtual]
 


Member Function Documentation

const char * dbField::asChars  )  const [virtual]
 

Reimplemented in dbChar, and dbText.

void dbField::CalculateWith dbCalculator adoptedCalculator,
bool  useOnlyForDefaults
[protected]
 

bool dbField::caseSensitive  )  const [inline]
 

virtual void dbField::clear  )  [inline, virtual]
 

Reimplemented in dbChar, dbText, dbFixedBinary, and dbNumericField.

virtual dbField* dbField::clone  )  const [pure virtual]
 

Implemented in dbChar, dbBLOB, dbText, dbFixedBinary, dbCompoundField, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, dbDateTime, oofChar, oofText, oofBLOB, oofDate, oofLong, oofUlong, oofShort, oofUshort, oofReal, oofBool, oofTime, oofDateTime, and dbRelRefBase.

void dbField::CopyCalculatedValueToBuffer  )  [protected, virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

oofString dbField::copyString  )  const [virtual]
 

Reimplemented in dbChar, and dbText.

virtual void dbField::copyValueFrom const dbField  )  [inline, virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

virtual void dbField::copyValueIfDifferent const dbField  )  [inline, virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

void dbField::describe std::ostream &  os  )  const [virtual]
 

Provide human-readable information about object.

Overriden to provide much more detail particularly for dbTable::describe() which provides full schema.

Reimplemented from OOF_PublicBase.

Reimplemented in dbChar, dbFixedBinary, and dbRelRefBase.

dbField * dbField::equivalentFieldFromTable dbTable  )  const
 

void dbField::extract std::ostream &   )  const [virtual]
 

Reimplemented in dbChar, dbBLOB, dbText, dbFixedBinary, dbCompoundField, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, dbDateTime, and dbRelRefBase.

unsigned long dbField::fieldDataLen  )  const [inline]
 

bool dbField::fieldIndexIgnoresNulls  )  const [inline]
 

bool dbField::fieldIndexIsCompressLeading  )  const [inline]
 

bool dbField::fieldIndexIsCompressPadding  )  const [inline]
 

OOF_IndexOptions dbField::fieldIndexOptions  )  const [inline]
 

bool dbField::fieldIsBinary  )  const [virtual]
 

Reimplemented in dbChar, and dbText.

bool dbField::fieldIsBlob  )  const [virtual]
 

Reimplemented in dbBLOB.

bool dbField::fieldIsIndexed  )  const [virtual]
 

bool dbField::fieldIsJoinKey  )  const
 

Checks if any relationships in field's table use field as join key.

Relatively expensive because it's iterating over all fields but all the function calls below are inline queries so will compile down well in release mode.

WARNING Doesn't fan out - if any other tables use this field as a join key then they are doing really weird stuff and the application programmer must add their own checks.

This feature originally added to support OOF_repEditSetupVisitor::VisitViewBandBody

bool dbField::fieldIsKeywordIndexed  )  const [virtual]
 

Reimplemented in dbChar, and dbText.

bool dbField::fieldIsPartiallyIndexed  )  const [inline]
 

bool dbField::fieldIsSameTypeAs const dbField  )  const [virtual]
 

Reimplemented in dbChar, dbFixedBinary, dbCompoundField, and dbRelRefBase.

bool dbField::fieldIsStandalone  )  const [inline]
 

bool dbField::fieldIsUniqueIndexed  )  const [virtual]
 

bool dbField::fieldIsVirtual  )  const [virtual]
 

Reimplemented in dbCompoundField, and dbRelRefBase.

unsigned short dbField::fieldKeyLen  )  const
 

unsigned long dbField::fieldMinWrapWidth  )  const [virtual]
 

Reimplemented in dbNumericField.

const oofString & dbField::fieldName  )  const [inline, virtual]
 

Reimplemented in dbRelRefBase.

fieldNumT dbField::fieldNumber  )  const [inline]
 

unsigned short dbField::fieldNumIndexes  )  const [inline]
 

virtual unsigned long dbField::fieldStorageLen  )  const [pure virtual]
 

Implemented in dbChar, dbBLOB, dbFixedBinary, dbCompoundField, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, dbDateTime, and dbRelRefBase.

dbTable * dbField::fieldTable  )  const
 

virtual OOF_fieldTypes dbField::fieldType  )  const [pure virtual]
 

Implemented in dbChar, dbBLOB, dbText, dbFixedBinary, dbCompoundField, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, dbDateTime, and dbRelRefBase.

unsigned long dbField::fieldUsualWrapWidth  )  const [virtual]
 

Reimplemented in dbChar, and dbText.

virtual void dbField::generateTestData bool  ,
unsigned  long
[inline, virtual]
 

Reimplemented in dbChar, dbBLOB, dbText, dbFixedBinary, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

void dbField::getChars char *  ioBuff,
unsigned long &  outLen
const [virtual]
 

Reimplemented in dbChar, and dbText.

bool dbField::hasDefaultCalculator  )  const [inline]
 

bool OOF_PublicBase::hidden  )  const [inline, inherited]
 

void OOF_PublicBase::hide bool  hideIt = true  )  [inline, inherited]
 

void dbField::index const  OOF_IndexOptions = kIndexed  ) 
 

void dbField::indexPartialKeyLen unsigned  short  )  [inline]
 

bool dbField::insert std::istream &  ,
char  fieldSep,
char  recSep
[virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

bool dbField::isDirty  )  const
 

Reimplemented in dbBLOB.

bool dbField::isEmpty  )  const [virtual]
 

Reimplemented in dbChar, dbBLOB, dbDate, and dbDateTime.

oofString dbField::name  )  const [virtual]
 

Reimplemented from OOF_PublicBase.

OOF_fieldTypes dbField::nativeType  )  const [virtual]
 

Reimplemented in dbText, dbBool, dbDate, dbTime, dbDateTime, and dbRelRefBase.

void dbField::operator= const char *   )  [inline]
 

Reimplemented in dbChar, dbText, dbFixedBinary, dbDate, dbTime, dbDateTime, oofChar, oofText, oofDate, oofTime, and oofDateTime.

virtual void dbField::postCloneTableCleanup  )  [inline, virtual]
 

Reimplemented in dbRelRefBase.

void dbField::saveDefaultCalculatedValue  ) 
 

void dbField::saveStoredCalculatedValue  ) 
 

void dbField::setName const char *  name  ) 
 

virtual void dbField::setNumber long   )  [inline, virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, and dbDateTime.

virtual void dbField::setString const char *   )  [inline, virtual]
 

Reimplemented in dbChar, dbText, dbFixedBinary, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, and dbDateTime.

void dbField::storeCalculatedValues  )  [inline]
 

bool dbField::storesCalculatedValues  )  const [inline]
 

const char * dbField::tableName  )  const
 

void dbField::useCalculatorOnlyForDefaults  )  [inline]
 

bool dbField::usingCalculator  )  const
 

bool dbField::validateContents  )  [virtual]
 

dbQueryClause * dbField::valueAsQueryLiteral  )  const [virtual]
 

Reimplemented in dbChar, dbText, dbShort, dbUshort, dbBool, dbLong, dbUlong, dbReal, dbDate, dbTime, and dbDateTime.

bool dbField::valueIsDuplicate  )  const
 

oofWordParser * dbField::words  )  const [virtual]
 

Reimplemented in dbChar, and dbText.


Friends And Related Function Documentation

friend class dbTable [friend]
 


Member Data Documentation

OOF_tableBackend* dbField::mBackend [protected]
 

dbCalculator* dbField::mCalculator [protected]
 

fieldNumT dbField::mFieldNumber [protected]
 

bool OOF_PublicBase::mHidden [protected, inherited]
 

dbTable* dbField::mTable [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 1 21:36:02 2004 for OOFILE by doxygen 1.3.5