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

dbLong Class Reference
[OOFILE Database package]

#include <oof4.h>

Inheritance diagram for dbLong:

Inheritance graph
[legend]
Collaboration diagram for dbLong:

Collaboration graph
[legend]
List of all members.

Detailed Description

Persistent field used to store a long.


Public Types

enum  FieldIsStandaloneT { eFieldIsStandalone }
enum  { kKeyLengthAutoCalculated = USHRT_MAX }

Public Member Functions

 dbLong (const char *fieldName=0)
 dbLong (const OOF_IndexOptions)
 dbLong (const char *fieldName, const OOF_IndexOptions)
 dbLong (dbField::FieldIsStandaloneT k)
 dbLong (const dbLong &)
virtual ~dbLong ()
virtual dbFieldclone () const
dbLongcalculateWith (dbLongCalculator *adoptedCalculator, bool useOnlyForDefaults=false)
dbLongCalculatorcalculator () const
virtual OOF_fieldTypes fieldType () const
virtual unsigned long fieldStorageLen () const
long value () const
virtual dbQueryClausevalueAsQueryLiteral () const
virtual void setString (const char *)
virtual void setNumber (long)
dbLongoperator= (long)
dbLongoperator= (int)
dbLongoperator= (const dbLong &)
dbLongoperator= (double)
 operator long () const
virtual void extract (std::ostream &os) const
virtual bool insert (std::istream &, char fieldSep, char recSep)
virtual void copyValueFrom (const dbField *)
virtual void copyValueIfDifferent (const dbField *)
virtual void generateTestData (bool generateRandom, unsigned long seedOrCount)
virtual unsigned long fieldMinWrapWidth () const
const oofStringformatMask () const
void formatMask (const char *)
virtual void clear ()
dbQueryBinary operator== (long) const
dbQueryBinary operator< (long) const
dbQueryBinary operator<= (long) const
dbQueryBinary operator>= (long) const
dbQueryBinary operator> (long) const
dbQueryBinary operator!= (long) const
dbQueryBinary equal (long) const
dbQueryBinary lessThan (long) const
dbQueryBinary lessThanOrEqual (long) const
dbQueryBinary greaterThanOrEqual (long) const
dbQueryBinary greaterThan (long) const
dbQueryBinary notEqual (long) const
dbQueryTrinary between (long, long) const
dbQueryTrinary outside (long, long) const
void operator+= (long)
void operator+= (double)
void operator-= (long)
void operator-= (double)
void operator *= (long)
void operator *= (double)
void operator/= (long)
void operator/= (double)
virtual dbQueryLiteralmakeQueryLiteral (long) 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 bool fieldIsSameTypeAs (const dbField *) const
virtual void describe (std::ostream &) const
 Provide human-readable information about object.

virtual OOF_fieldTypes nativeType () 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
bool fieldIsJoinKey () const
 Checks if any relationships in field's table use field as join key.

virtual oofString copyString () const
virtual void getChars (char *ioBuff, unsigned long &outLen) const
virtual const char * asChars () const
virtual bool validateContents ()
virtual oofWordParserwords () const
void saveDefaultCalculatedValue ()
void saveStoredCalculatedValue ()
bool hidden () const
void hide (bool hideIt=true)

Static Public Member Functions

TOKEN get_token (const char **s, const OOF_TOKENTYPE *m, unsigned int len)
void parseMask (const char *s, TOKEN *r, const OOF_TOKENTYPE *map, unsigned int len)

Public Attributes

OOF_String mFormatMask

Protected Member Functions

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

Static Protected Member Functions

void CheckRange (double d, long minL, long maxL, const char *file, int line)
void CheckRange (long l, long minL, long maxL, const char *file, int line)
void CheckRange (unsigned long l, unsigned long max, const char *file, int line)

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

dbLong::dbLong const char *  fieldName = 0  ) 
 

dbLong::dbLong const  OOF_IndexOptions  ) 
 

dbLong::dbLong const char *  fieldName,
const  OOF_IndexOptions
 

dbLong::dbLong dbField::FieldIsStandaloneT  k  ) 
 

dbLong::dbLong const dbLong  ) 
 

dbLong::~dbLong  )  [virtual]
 


Member Function Documentation

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

Reimplemented in dbChar, and dbText.

dbQueryTrinary dbNumericField::between long  ,
long 
const [inherited]
 

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

dbLong & dbLong::calculateWith dbLongCalculator adoptedCalculator,
bool  useOnlyForDefaults = false
 

dbLongCalculator * dbLong::calculator  )  const [inline]
 

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

void dbNumericField::CheckRange unsigned long  l,
unsigned long  max,
const char *  file,
int  line
[static, protected, inherited]
 

void dbNumericField::CheckRange long  l,
long  minL,
long  maxL,
const char *  file,
int  line
[static, protected, inherited]
 

void dbNumericField::CheckRange double  d,
long  minL,
long  maxL,
const char *  file,
int  line
[static, protected, inherited]
 

void dbNumericField::clear  )  [virtual, inherited]
 

Reimplemented from dbField.

dbField * dbLong::clone  )  const [virtual]
 

Implements dbField.

Reimplemented in oofLong.

void dbLong::CopyCalculatedValueToBuffer  )  [protected, virtual]
 

Reimplemented from dbField.

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

Reimplemented in dbChar, and dbText.

void dbLong::copyValueFrom const dbField  )  [virtual]
 

Reimplemented from dbField.

void dbLong::copyValueIfDifferent const dbField  )  [virtual]
 

Reimplemented from dbField.

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.

dbQueryBinary dbNumericField::equal long   )  const [inherited]
 

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

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

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

Reimplemented in dbChar, dbFixedBinary, dbCompoundField, and dbRelRefBase.

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 dbNumericField::fieldMinWrapWidth  )  const [virtual, inherited]
 

Reimplemented from dbField.

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 dbLong::fieldStorageLen  )  const [virtual]
 

Implements dbField.

dbTable * dbField::fieldTable  )  const [inherited]
 

OOF_fieldTypes dbLong::fieldType  )  const [virtual]
 

Implements dbField.

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

Reimplemented in dbChar, and dbText.

void dbNumericField::formatMask const char *   )  [inline, inherited]
 

const oofString & dbNumericField::formatMask  )  const [inline, inherited]
 

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

Reimplemented from dbField.

TOKEN dbNumericField::get_token const char **  s,
const OOF_TOKENTYPE m,
unsigned int  len
[static, inherited]
 

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

Reimplemented in dbChar, and dbText.

dbQueryBinary dbNumericField::greaterThan long   )  const [inherited]
 

dbQueryBinary dbNumericField::greaterThanOrEqual long   )  const [inherited]
 

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 dbLong::insert std::istream &  ,
char  fieldSep,
char  recSep
[virtual]
 

Reimplemented from dbField.

bool dbField::isDirty  )  const [inherited]
 

Reimplemented in dbBLOB.

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

Reimplemented in dbChar, dbBLOB, dbDate, and dbDateTime.

dbQueryBinary dbNumericField::lessThan long   )  const [inherited]
 

dbQueryBinary dbNumericField::lessThanOrEqual long   )  const [inherited]
 

dbQueryLiteral * dbNumericField::makeQueryLiteral long   )  const [virtual, inherited]
 

Reimplemented in dbShort, dbUshort, dbBool, dbUlong, and dbReal.

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 dbNumericField::notEqual long   )  const [inherited]
 

void dbNumericField::operator *= double   )  [inherited]
 

void dbNumericField::operator *= long   )  [inherited]
 

dbLong::operator long  )  const
 

dbQueryBinary dbNumericField::operator!= long   )  const [inherited]
 

void dbNumericField::operator+= double   )  [inherited]
 

void dbNumericField::operator+= long   )  [inherited]
 

Reimplemented in dbDate, dbTime, and dbDateTime.

void dbNumericField::operator-= double   )  [inherited]
 

void dbNumericField::operator-= long   )  [inherited]
 

Reimplemented in dbDate, dbTime, and dbDateTime.

void dbNumericField::operator/= double   )  [inherited]
 

void dbNumericField::operator/= long   )  [inherited]
 

dbQueryBinary dbNumericField::operator< long   )  const [inherited]
 

dbQueryBinary dbNumericField::operator<= long   )  const [inherited]
 

dbLong & dbLong::operator= double   )  [inline]
 

dbLong & dbLong::operator= const dbLong  ) 
 

Reimplemented in oofLong.

dbLong & dbLong::operator= int   )  [inline]
 

dbLong & dbLong::operator= long   ) 
 

Reimplemented in oofLong.

dbQueryBinary dbNumericField::operator== long   )  const [inherited]
 

dbQueryBinary dbNumericField::operator> long   )  const [inherited]
 

dbQueryBinary dbNumericField::operator>= long   )  const [inherited]
 

dbQueryTrinary dbNumericField::outside long  ,
long 
const [inherited]
 

void dbNumericField::parseMask const char *  s,
TOKEN r,
const OOF_TOKENTYPE map,
unsigned int  len
[static, inherited]
 

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

Reimplemented in dbRelRefBase.

void dbField::saveDefaultCalculatedValue  )  [inherited]
 

void dbField::saveStoredCalculatedValue  )  [inherited]
 

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

void dbLong::setNumber long   )  [virtual]
 

Reimplemented from dbField.

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

Reimplemented from dbField.

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]
 

long dbLong::value  )  const [inline]
 

dbQueryClause * dbLong::valueAsQueryLiteral  )  const [virtual]
 

Reimplemented from dbField.

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]
 

OOF_String dbNumericField::mFormatMask [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 Thu Jan 1 21:40:20 2004 for OOFILE by doxygen 1.3.5