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

dbCompoundField Class Reference
[OOFILE Database package]

#include <oof3.h>

Inheritance diagram for dbCompoundField:

Inheritance graph
[legend]
Collaboration diagram for dbCompoundField:

Collaboration graph
[legend]
List of all members.

Detailed Description

Persistent field used to store a set of segments referring to other fields.

Most often used to declare a compound index. Unless indexed, often will not actually allocate storage in the database. Read-only field.


Public Types

enum  FieldIsStandaloneT { eFieldIsStandalone }
enum  { kKeyLengthAutoCalculated = USHRT_MAX }

Public Member Functions

 dbCompoundField (const OOF_IndexOptions)
 dbCompoundField (const char *fieldName=0)
 dbCompoundField (const char *fieldName, const OOF_IndexOptions)
 dbCompoundField (const dbCompoundField &)
virtual ~dbCompoundField ()
virtual dbFieldclone () const
virtual void addSegment (dbField &)
virtual void extract (std::ostream &os) const
virtual bool fieldIsSameTypeAs (const dbField *) const
virtual OOF_fieldTypes fieldType () const
virtual unsigned long fieldStorageLen () const
virtual bool fieldIsVirtual () const
const dbFieldfield (unsigned int) const
dbQueryBinary operator== (const char *) const
dbQueryBinary operator< (const char *) const
dbQueryBinary operator<= (const char *) const
dbQueryBinary operator>= (const char *) const
dbQueryBinary operator> (const char *) const
dbQueryBinary operator!= (const char *) const
dbQueryBinary startsWith (const char *str) const
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 void describe (std::ostream &) const
 Provide human-readable information about object.

virtual OOF_fieldTypes nativeType () const
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
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)
virtual oofString copyString () const
virtual void getChars (char *ioBuff, unsigned long &outLen) const
virtual const char * asChars () 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)
virtual unsigned short countSegments () const
OOF_FieldSegOwneroperator<< (dbField &)
OOF_FieldSegOwneroperator>> (dbField &)
void toggleSegmentReversedFlags ()
OOF_Segmentsegment (unsigned int) const
fieldNumT fieldNumberOfSegment (unsigned int) const

Protected Member Functions

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

Protected Attributes

OOF_tableBackendmBackend
dbTablemTable
fieldNumT mFieldNumber
dbCalculatormCalculator
bool mHidden


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumeration values:
kKeyLengthAutoCalculated 

enum dbField::FieldIsStandaloneT [inherited]
 

Enumeration values:
eFieldIsStandalone 


Constructor & Destructor Documentation

dbCompoundField::dbCompoundField const  OOF_IndexOptions  ) 
 

dbCompoundField::dbCompoundField const char *  fieldName = 0  ) 
 

dbCompoundField::dbCompoundField const char *  fieldName,
const  OOF_IndexOptions
 

dbCompoundField::dbCompoundField const dbCompoundField  ) 
 

virtual dbCompoundField::~dbCompoundField  )  [inline, virtual]
 


Member Function Documentation

void dbCompoundField::addSegment dbField  )  [virtual]
 

Reimplemented from OOF_FieldSegOwner.

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

Reimplemented in dbChar, and dbText.

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

bool dbField::caseSensitive  )  const [inline, inherited]
 

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

Reimplemented in dbChar, dbText, dbFixedBinary, and dbNumericField.

dbField * dbCompoundField::clone  )  const [virtual]
 

Implements dbField.

void dbField::CopyCalculatedValueToBuffer  )  [protected, virtual, inherited]
 

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

oofString dbField::copyString  )  const [virtual, inherited]
 

Reimplemented in dbChar, and dbText.

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

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

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

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

unsigned short OOF_FieldSegOwner::countSegments  )  const [inline, virtual, inherited]
 

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

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 [inherited]
 

void dbCompoundField::extract std::ostream &  os  )  const [virtual]
 

Reimplemented from dbField.

const dbField * dbCompoundField::field unsigned  int  )  const
 

unsigned long dbField::fieldDataLen  )  const [inline, inherited]
 

bool dbField::fieldIndexIgnoresNulls  )  const [inline, inherited]
 

bool dbField::fieldIndexIsCompressLeading  )  const [inline, inherited]
 

bool dbField::fieldIndexIsCompressPadding  )  const [inline, inherited]
 

OOF_IndexOptions dbField::fieldIndexOptions  )  const [inline, inherited]
 

bool dbField::fieldIsBinary  )  const [virtual, inherited]
 

Reimplemented in dbChar, and dbText.

bool dbField::fieldIsBlob  )  const [virtual, inherited]
 

Reimplemented in dbBLOB.

bool dbField::fieldIsIndexed  )  const [virtual, inherited]
 

bool dbField::fieldIsJoinKey  )  const [inherited]
 

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, inherited]
 

Reimplemented in dbChar, and dbText.

bool dbField::fieldIsPartiallyIndexed  )  const [inline, inherited]
 

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

Reimplemented from dbField.

bool dbField::fieldIsStandalone  )  const [inline, inherited]
 

bool dbField::fieldIsUniqueIndexed  )  const [virtual, inherited]
 

bool dbCompoundField::fieldIsVirtual  )  const [virtual]
 

Reimplemented from dbField.

unsigned short dbField::fieldKeyLen  )  const [inherited]
 

unsigned long dbField::fieldMinWrapWidth  )  const [virtual, inherited]
 

Reimplemented in dbNumericField.

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

Reimplemented in dbRelRefBase.

fieldNumT dbField::fieldNumber  )  const [inline, inherited]
 

fieldNumT OOF_FieldSegOwner::fieldNumberOfSegment unsigned  int  )  const [inherited]
 

unsigned short dbField::fieldNumIndexes  )  const [inline, inherited]
 

unsigned long dbCompoundField::fieldStorageLen  )  const [virtual]
 

Implements dbField.

dbTable * dbField::fieldTable  )  const [inherited]
 

OOF_fieldTypes dbCompoundField::fieldType  )  const [virtual]
 

Implements dbField.

unsigned long dbField::fieldUsualWrapWidth  )  const [virtual, inherited]
 

Reimplemented in dbChar, and dbText.

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

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, inherited]
 

Reimplemented in dbChar, and dbText.

bool dbField::hasDefaultCalculator  )  const [inline, inherited]
 

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

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

void dbField::index const  OOF_IndexOptions = kIndexed  )  [inherited]
 

void dbField::indexPartialKeyLen unsigned  short  )  [inline, inherited]
 

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

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

bool dbField::isDirty  )  const [inherited]
 

Reimplemented in dbBLOB.

bool dbField::isEmpty  )  const [virtual, inherited]
 

Reimplemented in dbChar, dbBLOB, dbDate, and dbDateTime.

oofString dbField::name  )  const [virtual, inherited]
 

Reimplemented from OOF_PublicBase.

OOF_fieldTypes dbField::nativeType  )  const [virtual, inherited]
 

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

dbQueryBinary dbCompoundField::operator!= const char *   )  const
 

dbQueryBinary dbCompoundField::operator< const char *   )  const
 

OOF_FieldSegOwner & OOF_FieldSegOwner::operator<< dbField  )  [inline, inherited]
 

Reimplemented in dbSorter.

dbQueryBinary dbCompoundField::operator<= const char *   )  const
 

dbQueryBinary dbCompoundField::operator== const char *   )  const
 

dbQueryBinary dbCompoundField::operator> const char *   )  const
 

dbQueryBinary dbCompoundField::operator>= const char *   )  const
 

OOF_FieldSegOwner & OOF_FieldSegOwner::operator>> dbField  )  [inherited]
 

Reimplemented in dbSorter.

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

Reimplemented in dbRelRefBase.

void dbField::saveDefaultCalculatedValue  )  [inherited]
 

void dbField::saveStoredCalculatedValue  )  [inherited]
 

OOF_Segment * OOF_FieldSegOwner::segment unsigned  int  )  const [inline, inherited]
 

void dbField::setName const char *  name  )  [inherited]
 

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

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

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

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

dbQueryBinary dbCompoundField::startsWith const char *  str  )  const
 

void dbField::storeCalculatedValues  )  [inline, inherited]
 

bool dbField::storesCalculatedValues  )  const [inline, inherited]
 

const char * dbField::tableName  )  const [inherited]
 

void OOF_FieldSegOwner::toggleSegmentReversedFlags  )  [inherited]
 

void dbField::useCalculatorOnlyForDefaults  )  [inline, inherited]
 

bool dbField::usingCalculator  )  const [inherited]
 

bool dbField::validateContents  )  [virtual, inherited]
 

dbQueryClause * dbField::valueAsQueryLiteral  )  const [virtual, inherited]
 

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

bool dbField::valueIsDuplicate  )  const [inherited]
 

oofWordParser * dbField::words  )  const [virtual, inherited]
 

Reimplemented in dbChar, and dbText.


Member Data Documentation

OOF_tableBackend* dbField::mBackend [protected, inherited]
 

dbCalculator* dbField::mCalculator [protected, inherited]
 

fieldNumT dbField::mFieldNumber [protected, inherited]
 

bool OOF_PublicBase::mHidden [protected, inherited]
 

dbTable* dbField::mTable [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 00:50:02 2004 for OOFILE by doxygen 1.3.5