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

dbFixedBinary Class Reference
[OOFILE Database package]

#include <oof3.h>

Inheritance diagram for dbFixedBinary:

Inheritance graph
[legend]
Collaboration diagram for dbFixedBinary:

Collaboration graph
[legend]
List of all members.

Detailed Description

Persistent field used to store a fixed-length binary object.


Public Types

enum  FieldIsStandaloneT { eFieldIsStandalone }
enum  { kKeyLengthAutoCalculated = USHRT_MAX }

Public Member Functions

 dbFixedBinary (long fieldWidth=4, const char *fieldName=0)
 dbFixedBinary (long fieldWidth, const OOF_IndexOptions indexOptions)
 dbFixedBinary (long fieldWidth, const char *fieldName, const OOF_IndexOptions indexOptions)
dbFixedBinaryoperator= (const dbFixedBinary &rhs)
 dbFixedBinary (dbField::FieldIsStandaloneT k)
virtual ~dbFixedBinary ()
virtual dbFieldclone () const
virtual bool fieldIsSameTypeAs (const dbField *) const
virtual OOF_fieldTypes fieldType () const
virtual unsigned long fieldStorageLen () const
dbFixedBinaryoperator= (const char *str)
virtual void setString (const char *)
void setValue (const void *str)
 Copies buffer for length fieldStorageLen().

void setByte (char c, unsigned long offset)
void clear ()
 Implemented in fairly simple-minded approach until need shown for better.

virtual void extract (std::ostream &os) const
virtual void generateTestData (bool generateRandom, unsigned long seedOrCount)
virtual void describe (std::ostream &os) const
 Provide human-readable information about object.

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 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
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 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 ()
bool hidden () const
void hide (bool hideIt=true)

Protected Member Functions

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

Protected Attributes

unsigned long mBodyLength
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

dbFixedBinary::dbFixedBinary long  fieldWidth = 4,
const char *  fieldName = 0
 

dbFixedBinary::dbFixedBinary long  fieldWidth,
const OOF_IndexOptions  indexOptions
 

dbFixedBinary::dbFixedBinary long  fieldWidth,
const char *  fieldName,
const OOF_IndexOptions  indexOptions
 

dbFixedBinary::dbFixedBinary dbField::FieldIsStandaloneT  k  )  [inline]
 

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


Member Function Documentation

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]
 

void dbFixedBinary::clear  )  [virtual]
 

Implemented in fairly simple-minded approach until need shown for better.

Uses loop writing single byte at a time because this is not widely-used data type and particularly not widely-used method. Simple approach saves having to add another interface responsibility for backends to allow clearing fields.

Reimplemented from dbField.

dbField * dbFixedBinary::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.

void dbFixedBinary::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 dbField.

dbField * dbField::equivalentFieldFromTable dbTable  )  const [inherited]
 

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

Bug:
needs implementing with readBytes in loop

Reimplemented from dbField.

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 dbFixedBinary::fieldIsSameTypeAs const dbField  )  const [virtual]
 

Reimplemented from dbField.

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

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

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

Reimplemented in dbCompoundField, and dbRelRefBase.

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]
 

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

unsigned long dbFixedBinary::fieldStorageLen  )  const [virtual]
 

Implements dbField.

dbTable * dbField::fieldTable  )  const [inherited]
 

OOF_fieldTypes dbFixedBinary::fieldType  )  const [virtual]
 

Implements dbField.

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

Reimplemented in dbChar, and dbText.

void dbFixedBinary::generateTestData bool  generateRandom,
unsigned long  seedOrCount
[virtual]
 

Reimplemented from dbField.

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.

dbFixedBinary & dbFixedBinary::operator= const char *  str  ) 
 

Reimplemented from dbField.

dbFixedBinary & dbFixedBinary::operator= const dbFixedBinary rhs  ) 
 

Bug:
needs implementing with readBytes in loop

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

Reimplemented in dbRelRefBase.

void dbField::saveDefaultCalculatedValue  )  [inherited]
 

void dbField::saveStoredCalculatedValue  )  [inherited]
 

void dbFixedBinary::setByte char  c,
unsigned long  offset
 

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.

void dbFixedBinary::setString const char *   )  [virtual]
 

Reimplemented from dbField.

void dbFixedBinary::setValue const void *  inBuf  ) 
 

Copies buffer for length fieldStorageLen().

void dbField::storeCalculatedValues  )  [inline, inherited]
 

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

const char * dbField::tableName  )  const [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]
 

unsigned long dbFixedBinary::mBodyLength [protected]
 

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:57:30 2004 for OOFILE by doxygen 1.3.5