OOFILE  1.9
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
dbTable Class Referenceabstract

Base class for persistent tables. More...

#include <oof1.h>

Inheritance diagram for dbTable:
Inheritance graph
[legend]
Collaboration diagram for dbTable:
Collaboration graph
[legend]

Public Types

enum  { kFieldSep = '\t' }
 
enum  { kRecSep = '\n' }
 
enum  saveOptionsT { requireExplicit, autoOnContextChange, requireExplicitAndBuffer, bufferForever }
 
enum  selSharingT { selNotShared, selShared, selCopyOnWrite, selNotSharedCacheCopied }
 
enum  tableValidT { eInvalid =0, eValid, eClosed }
 

Public Member Functions

void addIndices (const char *newIDXname)
 
void addReceiver (oofReceiver *)
 Append receiver to end of list. More...
 
bool askAllReturningAny (bool returnAny, OOFmsgT msg, unsigned long senderDefined=0, const oofReceiver *skipping=0)
 
oofReceiveraskAllStoppingAtFirst (bool stopOn, OOFmsgT msg, unsigned long senderDefined=0, const oofReceiver *skipping=0)
 
void attachfield (dbField *)
 
void broadcast (OOFmsgT msg, unsigned long senderDefined=0, const oofReceiver *skipping=0)
 Broadcast a message to all anonymous subscribers. More...
 
void buildSchema ()
 
virtual bool canSaveRecord ()
 
bool changeShielded () const
 change shielding, so field changes don't mark the record as dirty. More...
 
void changeShielded (bool setShielding=true)
 
virtual dbTablecloneTable (selSharingT selSharing=selCopyOnWrite)=0
 
virtual dbTablecloneTableConst (selSharingT selSharing) const =0
 pure virtual cloneTable is implemented by macro OOFILE_METHODS, in oofmacro.h, for each user subclass. More...
 
virtual dbTablecloneTableSharingSelection () const
 
virtual dbTablecloneTableWithoutSelection () const
 
virtual dbTablecloneTbleWithCachNoSelection () const
 
void close ()
 
void createTableInConnection (const dbConnect *)
 
oidT currentOID ()
 Absolute record address of current record. More...
 
 dbTable (const char *name=0)
 
 dbTable (const dbTable &)
 
 dbTable (const dbTable &, OOF_tableBackend *)
 
virtual const char * defaultName () const
 
void deleteStorage ()
 
void describeInvariant (std::ostream &os) const
 
bool ensureRecordLoaded (bool autoCreateRelated=false, bool failureAborts=true)
 
void ensureSelectionLoaded ()
 
virtual void generateTestData (unsigned long numRecords, bool generateRandom=true, unsigned long seedOrCount=0)
 
oofWordParsergetDefaultWordParser ()
 
dbGUIgetGUI ()
 
bool hidden () const
 
void hide (bool hideIt=true)
 
bool isBroadcasting () const
 
bool loadRelatedContextJoiningFromTo (const dbField *, const dbField *)
 Change table's current loaded selection and current record to satisfy a join. More...
 
virtual dbViewmakeView ()
 
virtual oofString name () const
 
unsigned int numFiles () const
 
unsigned int numIndexes () const
 
oidT oidOfRecord (unsigned long)
 
bool openTableInConnection (const dbConnect *, const bool createIfMissing=false)
 
void pack ()
 
bool pointsToBackend (const OOF_tableBackend *) const
 
void postCloneTableCleanup ()
 
dbTableprototype () const
 
void rebuild ()
 
void relateAllDeletables ()
 
void removeReceiver (const oofReceiver *)
 
unsigned long sequenceNumber () const
 
void setDefaultWordParser (oofWordParser *inParser)
 
void setFileExtensions (const char *dataExt, const char *indexExt)
 
void setName (const char *)
 
void setSaveOption (const saveOptionsT)
 
void setTableValid (bool isValid=true)
 Force current table state to valid. More...
 
void stillCurrentlyConstructing ()
 
void suppressIndices ()
 
virtual ~dbTable ()
 
recordwise access
void start ()
 
void next ()
 Next record in the selection becomes current. More...
 
void first ()
 First record in the selection becomes current. More...
 
void prev ()
 Previous record in the selection becomes current. More...
 
void last ()
 Last record in the selection becomes current. More...
 
bool more () const
 When iterating a selection, are there any more records beyond current. More...
 
bool atFirst () const
 
bool atLast () const
 
bool atRelative (unsigned long) const
 
unsigned long count ()
 Count records in current selection. More...
 
unsigned long countAll () const
 Count records in database regardless of current selection. More...
 
sorting
void setSortOrder (const dbField &, bool shouldReverse=false)
 
void setSortOrder (const dbSorter &)
 
void setReverseSortOrder (const dbField &)
 
dbSortersorter () const
 
void sortNow () const
 
void unSorted ()
 
void suspendSorting ()
 
void resumeSorting ()
 
change record state
void unloadRecord ()
 
bool reloadRecord ()
 
void markDirty ()
 
state enquiry
bool isRecordLoaded () const
 
bool isEmpty ()
 
bool isNewRecord () const
 
bool isTableValid () const
 
tableValidT validStatus () const
 
int validatingDepth () const
 
bool allSelected () const
 Does the current selection represent all records or just a subset. More...
 
bool isDirty () const
 
change duplicate handling, typically for wrapping import code
void ignoreDuplicateRecords ()
 
void noticeDuplicateRecords ()
 
recordNumber operations for temporary direct acccess
unsigned long recordNumber () const
 Ordinal record number of current record in selection. More...
 
unsigned long recordNumberOfOID (oidT inOID)
 Find ordinal position in ordered selection of record by OID. More...
 
unsigned long recordNumber (const dbQueryClause *qClause, bool *outFoundIt=0) const
 
unsigned long recordNumber (const dbQueryClause &qClause, bool *outFoundIt=0) const
 
bool gotoRecord (unsigned long)
 
keyword searches
dbQueryBinaryNofield hasWord (const char *str) const
 
dbQueryBinaryNofield hasAnyWordsDelimited (const char *, char delimiter)
 
dbQueryBinaryNofield hasAllWordsDelimited (const char *, char delimiter)
 
dbQueryBinaryNofield hasAnyWordsOf (const char **schStrs, unsigned long count)
 
dbQueryBinaryNofield hasAllWordsOf (const char **schStrs, unsigned long count)
 
dbQueryBinaryNofield hasAnyWordsOf (oofWordParser *)
 
dbQueryBinaryNofield hasAllWordsOf (oofWordParser *)
 
dbQueryBinaryNofield hasWordStartsWith (const char *str) const
 
dbQueryBinaryNofield hasAnyWordsStartsWithDelimited (const char *, char delimiter)
 
dbQueryBinaryNofield hasAllWordsStartsWithDelimited (const char *, char delimiter)
 
dbQueryBinaryNofield hasAnyWordsStartsWithOf (const char **schStrs, unsigned long count)
 
dbQueryBinaryNofield hasAllWordsStartsWithOf (const char **schStrs, unsigned long count)
 
dbQueryBinaryNofield hasAnyWordsStartsWithOf (oofWordParser *)
 
dbQueryBinaryNofield hasAllWordsStartsWithOf (oofWordParser *)
 
public search functions
bool search (const dbQueryClause &query)
 
bool searchSelection (const dbQueryClause &query)
 
bool search (const dbQueryClause *query)
 
bool searchSelection (const dbQueryClause *query)
 
bool searchSelContainsAnyDelimited (const dbField &schField, const char *schStr, char delim)
 
bool searchSelContainsAnyOf (const dbField &schField, const char **schStrs, unsigned long count)
 
bool searchSelContainsAnyOf (const dbField &schField, oofWordParser *)
 
bool searchSelContainsAllDelimited (const dbField &schField, const char *schStr, char delim)
 
bool searchSelContainsAllOf (const dbField &schField, const char **schStrs, unsigned long count)
 
bool searchSelContainsAllOf (const dbField &schField, oofWordParser *)
 
set operations
void difference_with (dbTable &)
 
void difference_with (dbTable *)
 
void difference_with (const dbSelection &)
 
void operator-= (dbTable &)
 Operator performing difference_with set operation. More...
 
void operator-= (dbTable *)
 Operator performing difference_with set operation. More...
 
void operator-= (const dbSelection &)
 Operator performing difference_with set operation. More...
 
void operator%= (dbTable &)
 Operator performing difference_with set operation. More...
 
void operator%= (dbTable *)
 Operator performing difference_with set operation. More...
 
void operator%= (const dbSelection &)
 Operator performing difference_with set operation. More...
 
void intersection_with (dbTable &)
 
void intersection_with (dbTable *)
 
void intersection_with (const dbSelection &)
 
void operator&= (dbTable &)
 Operator performing intersection_with set operation. More...
 
void operator&= (dbTable *)
 Operator performing intersection_with set operation. More...
 
void operator&= (const dbSelection &)
 Operator performing intersection_with set operation. More...
 
void union_with (dbTable &)
 
void union_with (dbTable *)
 
void union_with (const dbSelection &)
 
void union_with_no_overlap (dbTable &)
 
void union_with_no_overlap (dbTable *)
 
void union_with_no_overlap (const dbSelection &)
 
void operator+= (dbTable &)
 Operator performing union_with set operation. More...
 
void operator+= (dbTable *)
 Operator performing union_with set operation. More...
 
void operator+= (const dbSelection &)
 Operator performing union_with set operation. More...
 
void operator|= (dbTable &)
 Operator performing union_with set operation. More...
 
void operator|= (dbTable *)
 Operator performing union_with set operation. More...
 
void operator|= (const dbSelection &)
 Operator performing union_with set operation. More...
 
void invert ()
 
void operator~ ()
 Operator performing invert set operation. More...
 
void operator! ()
 Operator performing invert set operation. More...
 
bool operator+= (oidT)
 Operator performing addOIDtoSelection set operation like union_with. More...
 
bool addOIDtoSelection (oidT)
 
bool contains (oidT)
 Check if current selection contains an OID. More...
 
void dropRecordFromSelection (unsigned long)
 
getting & saving selections as lightweight objects
dbSelection currentSelection ()
 
dbSelection makeEmptySelection () const
 
void setSelection (const dbSelection &)
 
void setSelection (const OOF_Selection *)
 
const dbSelectionoperator= (const dbSelection &rhs)
 
selection changes that broadcast, eg: to update MN relationship links
void appendSelection (const dbSelection &)
 
void removeSelection (const dbSelection &)
 
void clearSelection ()
 
selection of specific contexts
void selectAll ()
 Change the current selection to all records. More...
 
void selectNone ()
 Change the current selection to no records. More...
 
bool selectJustOID (oidT)
 Try to change the current selection to just the matching record. More...
 
void selectJustCurrent ()
 Change the current selection to just the current record. More...
 
bool relateSelectionFrom (dbTable *)
 
bool selectAllRelated (bool broadcastChange=true)
 
data access
virtual void newRecord ()
 
virtual void cloneRecord ()
 
virtual void postCloneRecordCleanup ()
 
virtual void saveRecord ()
 
virtual void revertRecord ()
 
virtual void deleteRecord ()
 
void deleteSelection ()
 
void deleteAll ()
 
void copyAllFrom (dbTable *)
 
dbTableAssigner operator<< (const char *)
 Create dbTableAssigner as fast way to create and set entire record. More...
 
void copyRecFrom (const dbTable *rhs, fieldNumT numFields=0)
 
dbTableoperator= (const dbTable &)
 
virtual void extract (std::ostream &)
 
virtual unsigned long insert (std::istream &)
 
virtual void import (const char *ansiFileName)
 
bool allowsShortImports () const
 
void setShortImports (bool)
 
reflective schema operators
const oofStringtableName () const
 
virtual oofString tableSingularName () const
 
tableNumT tableNumber () const
 
bool tableCachesDirtyRecords () const
 
saveOptionsT tableSaveOption () const
 
virtual void describe (std::ostream &) const
 Provide human-readable information about object. More...
 
virtual void describeState (std::ostream &) const
 
virtual void stats (std::ostream &)
 
bool isCopyCompatibleWith (const dbTable *) const
 
fieldNumT numFields () const
 
dbFieldfield (fieldNumT) const
 
dbFieldfield (const oofString &)
 
bool isOpen () const
 
bool inDeclarativePhase () const
 Has database been opened or are we still potentially declaring tables. More...
 
info about relationships
bool isRelatedClone () const
 
dbRelRefBasecontrollingRelationship () const
 
dbTablelhsTableInRelationshipSpec () const
 
dbTablebaseTableOfRelationChain ()
 
locking
void lockRecord ()
 
void unlockRecord ()
 
bool lockedCurrentRecord () const
 
transactions
void beginTransaction (short tMode=0)
 Start a transaction if not already in one. More...
 
void abortTransaction (short rMode=0)
 Forward request to backend to abort transaction, if mInTransaction. More...
 
void commitTransaction (short rMode=0)
 
bool transactionDirty ()
 

Protected Member Functions

void BroadcastShutdown ()
 

Protected Attributes

bool mAllowShortImports
 
OOF_tableBackendmBackend
 
fieldNumT mFieldCount
 
OOF_Dictionary mFields
 
dbGUImGUI
 
bool mHidden
 
bool mLostReceiversWhileBroadcasting
 simple flag that removeReceiver was called during nested broadcast More...
 
unsigned long mNestedBroadcastingDepth
 aid to debugging and removeReceiver More...
 
OOF_ExpandableLongArraymReceivers
 owned More...
 
saveOptionsT mSaveOption
 
oofString mTableName
 
tableNumT mTableNumber
 
tableValidT mTableValid
 
int mValidatingDepth
 

Static Protected Attributes

static dbTablesCurrentlyConstructing
 

Friends

class dbConnect
 
class dbConnect_ram
 
class dbConnect_ramp
 
class dbField
 
class dbRelHalf
 
class dbRelRefBase
 
void dbSelection::difference_with (dbTable &)
 
class OOF_tableBackend
 
class oofE_Table
 

Detailed Description

Base class for persistent tables.

Must be used in association with a dbConnect subclass to provide persistence. Contains one or more dbField members either by declaration or attachField().

Definition at line 452 of file oof1.h.

Constructor & Destructor Documentation

dbTable::dbTable ( const char *  name = 0)
dbTable::dbTable ( const dbTable rhs)
dbTable::dbTable ( const dbTable rhs,
OOF_tableBackend inBackend 
)

Definition at line 1058 of file oof1.cpp.

References OOF_mixRefCount::incRefs(), and sCurrentlyConstructing.

dbTable::~dbTable ( )
virtual

Member Function Documentation

void dbTable::abortTransaction ( short  rMode = 0)

Forward request to backend to abort transaction, if mInTransaction.

Todo:
Investigate if should use transaction nesting count, not just mInTransaction.

Definition at line 2264 of file oof1.cpp.

References OOF_tableBackend::abortTransaction(), and mBackend.

Referenced by dbGUI::leaveRecord().

void dbTable::addIndices ( const char *  newIDXname)

Definition at line 1166 of file oof1.cpp.

References OOF_tableBackend::addIndices(), and mBackend.

bool dbTable::addOIDtoSelection ( oidT  inOID)
void oofBroadcaster::addReceiver ( oofReceiver addingReceiver)
inherited

Append receiver to end of list.

Includes assertion to check if already in list.

Definition at line 181 of file oofmsg.cpp.

References OOF_ExpandableLongArray::append(), OOF_ExpandableLongArray::find(), and oofBroadcaster::mReceivers.

Referenced by oofSingleListener::oofSingleListener(), oofReceiver::subscribeTo(), and oofSingleListener::subscribeTo().

bool dbTable::allowsShortImports ( ) const

Definition at line 1525 of file oof1.cpp.

References mAllowShortImports.

bool dbTable::allSelected ( ) const
inline

Does the current selection represent all records or just a subset.

Definition at line 1906 of file oof1.h.

Referenced by appendSelection().

void dbTable::appendSelection ( const dbSelection inSel)
bool oofBroadcaster::askAllReturningAny ( bool  returnAny,
OOFmsgT  msg,
unsigned long  senderDefined = 0,
const oofReceiver skipping = 0 
)
inherited
oofReceiver * oofBroadcaster::askAllStoppingAtFirst ( bool  stopOn,
OOFmsgT  msg,
unsigned long  senderDefined = 0,
const oofReceiver skipping = 0 
)
inherited
bool dbTable::atFirst ( ) const
inline
bool dbTable::atLast ( ) const
inline
bool dbTable::atRelative ( unsigned long  rel) const
inline

Definition at line 1927 of file oof1.h.

void dbTable::attachfield ( dbField theField)

Definition at line 1468 of file oof1.cpp.

References OOF_Dictionary::append(), and mFields.

Referenced by dbField::dbField().

dbTable * dbTable::baseTableOfRelationChain ( )
void dbTable::beginTransaction ( short  tMode = 0)

Start a transaction if not already in one.

Todo:
Decide if this is robust as ignores nested requests!

Definition at line 2238 of file oof1.cpp.

References OOF_tableBackend::beginTransaction(), and mBackend.

Referenced by generateTestData(), and dbGUI::newRecord().

void oofBroadcaster::broadcast ( OOFmsgT  msg,
unsigned long  senderDefined = 0,
const oofReceiver skipping = 0 
)
inherited
void oofBroadcaster::BroadcastShutdown ( )
protectedinherited
void dbTable::buildSchema ( )
bool dbTable::canSaveRecord ( )
virtual

Definition at line 1416 of file oof1.cpp.

bool dbTable::changeShielded ( ) const
inline

change shielding, so field changes don't mark the record as dirty.

(default is false) Used when we don't want operations to propagate, eg: if updating a field and need to finish some local op before related data updates.

Definition at line 2492 of file oof1.h.

Referenced by stChangeShielded::stChangeShielded(), and stChangeShielded::~stChangeShielded().

void dbTable::changeShielded ( bool  setShielding = true)
inline

Definition at line 2499 of file oof1.h.

void dbTable::clearSelection ( )
void dbTable::cloneRecord ( )
virtual
virtual dbTable* dbTable::cloneTable ( selSharingT  selSharing = selCopyOnWrite)
pure virtual
virtual dbTable* dbTable::cloneTableConst ( selSharingT  selSharing) const
pure virtual

pure virtual cloneTable is implemented by macro OOFILE_METHODS, in oofmacro.h, for each user subclass.

It is abstract to avoid bugs from people missing their OOFILE_METHODS in table declarations

Referenced by cloneTableSharingSelection(), cloneTableWithoutSelection(), and cloneTbleWithCachNoSelection().

dbTable * dbTable::cloneTableSharingSelection ( ) const
virtual
dbTable * dbTable::cloneTableWithoutSelection ( ) const
virtual
dbTable * dbTable::cloneTbleWithCachNoSelection ( ) const
virtual

Definition at line 1443 of file oof1.cpp.

References cloneTableConst(), and selNotSharedCacheCopied.

void dbTable::close ( )
void dbTable::commitTransaction ( short  rMode = 0)

Definition at line 2249 of file oof1.cpp.

References OOF_tableBackend::commitTransaction(), and mBackend.

Referenced by generateTestData(), and dbGUI::leaveRecord().

bool dbTable::contains ( oidT  inOID)
inline

Check if current selection contains an OID.

Use with selectAll to see if OID is anywhere in database.

Definition at line 1951 of file oof1.h.

dbRelRefBase * dbTable::controllingRelationship ( ) const
inline
void dbTable::copyAllFrom ( dbTable rhs)
void dbTable::copyRecFrom ( const dbTable rhs,
fieldNumT  numFields = 0 
)

Definition at line 1939 of file oof1.cpp.

References dbField::copyValueFrom(), field(), dbField::fieldIsVirtual(), and mFieldCount.

Referenced by cloneRecord(), copyAllFrom(), and operator=().

unsigned long dbTable::count ( )
inline
unsigned long dbTable::countAll ( ) const
inline

Count records in database regardless of current selection.

Definition at line 2029 of file oof1.h.

Referenced by dbSelection::count(), deleteAll(), and stats().

void dbTable::createTableInConnection ( const dbConnect theDB)
oidT dbTable::currentOID ( )
inline
dbSelection dbTable::currentSelection ( )
virtual const char* dbTable::defaultName ( ) const
inlinevirtual

Definition at line 467 of file oof1.h.

Referenced by buildSchema(), and dbRelRefBase::relatesTo().

void dbTable::deleteAll ( )
void dbTable::deleteRecord ( )
virtual
void dbTable::deleteSelection ( )
void dbTable::deleteStorage ( )
void dbTable::describe ( std::ostream &  ) 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.

Definition at line 1812 of file oof1.cpp.

References OOF_Dictionary::describe(), oofString::isEmpty(), mFields, and mTableName.

void dbTable::describeInvariant ( std::ostream &  os) const
inline

Definition at line 2507 of file oof1.h.

void dbTable::describeState ( std::ostream &  ) const
virtual
void dbTable::difference_with ( dbTable rhs)
void dbTable::difference_with ( dbTable rhs)
inline

Definition at line 2077 of file oof1.h.

void dbTable::difference_with ( const dbSelection rhs)
void dbTable::dropRecordFromSelection ( unsigned long  inRecNum)
bool dbTable::ensureRecordLoaded ( bool  autoCreateRelated = false,
bool  failureAborts = true 
)
void dbTable::ensureSelectionLoaded ( )
inline

Definition at line 2005 of file oof1.h.

void dbTable::extract ( std::ostream &  )
virtual
dbField * dbTable::field ( fieldNumT  fieldNum) const
inline
dbField * dbTable::field ( const oofString fieldName)
inline

Definition at line 2362 of file oof1.h.

void dbTable::first ( )
inline

First record in the selection becomes current.

If no records in selection will not have a current record but no error returned.

Definition at line 1986 of file oof1.h.

Referenced by dbGUI::goFirstRecord(), and oofRepWindow::ListenToMessage().

void dbTable::generateTestData ( unsigned long  numRecords,
bool  generateRandom = true,
unsigned long  seedOrCount = 0 
)
virtual
oofWordParser * dbTable::getDefaultWordParser ( )
dbGUI * dbTable::getGUI ( )
bool dbTable::gotoRecord ( unsigned long  relativeNum)
dbQueryBinaryNofield dbTable::hasAllWordsDelimited ( const char *  str,
char  delimiter 
)

Definition at line 366 of file oofwords.cpp.

References dbQueryClause::hasAllWords.

dbQueryBinaryNofield dbTable::hasAllWordsOf ( const char **  schStrs,
unsigned long  count 
)

Definition at line 380 of file oofwords.cpp.

References dbQueryClause::hasAllWords.

Referenced by hasAllWordsOf().

dbQueryBinaryNofield dbTable::hasAllWordsOf ( oofWordParser inParser)
dbQueryBinaryNofield dbTable::hasAllWordsStartsWithDelimited ( const char *  str,
char  delimiter 
)

Definition at line 410 of file oofwords.cpp.

References dbQueryClause::hasAllWordsStartsWith.

dbQueryBinaryNofield dbTable::hasAllWordsStartsWithOf ( const char **  schStrs,
unsigned long  count 
)

Definition at line 424 of file oofwords.cpp.

References dbQueryClause::hasAllWordsStartsWith.

Referenced by hasAllWordsStartsWithOf().

dbQueryBinaryNofield dbTable::hasAllWordsStartsWithOf ( oofWordParser inParser)
dbQueryBinaryNofield dbTable::hasAnyWordsDelimited ( const char *  str,
char  delimiter 
)

Definition at line 359 of file oofwords.cpp.

References dbQueryClause::hasAnyWord.

dbQueryBinaryNofield dbTable::hasAnyWordsOf ( const char **  schStrs,
unsigned long  count 
)

Definition at line 373 of file oofwords.cpp.

References dbQueryClause::hasAnyWord.

Referenced by hasAnyWordsOf().

dbQueryBinaryNofield dbTable::hasAnyWordsOf ( oofWordParser inParser)
dbQueryBinaryNofield dbTable::hasAnyWordsStartsWithDelimited ( const char *  str,
char  delimiter 
)

Definition at line 403 of file oofwords.cpp.

References dbQueryClause::hasAnyWordStartsWith.

dbQueryBinaryNofield dbTable::hasAnyWordsStartsWithOf ( const char **  schStrs,
unsigned long  count 
)

Definition at line 417 of file oofwords.cpp.

References dbQueryClause::hasAnyWordStartsWith.

Referenced by hasAnyWordsStartsWithOf().

dbQueryBinaryNofield dbTable::hasAnyWordsStartsWithOf ( oofWordParser inParser)
dbQueryBinaryNofield dbTable::hasWord ( const char *  str) const

Definition at line 345 of file oofwords.cpp.

References dbQueryClause::hasWord.

dbQueryBinaryNofield dbTable::hasWordStartsWith ( const char *  str) const

Definition at line 352 of file oofwords.cpp.

References dbQueryClause::hasWordStartsWith.

bool OOF_PublicBase::hidden ( ) const
inlineinherited

Definition at line 51 of file oof1.h.

Referenced by OOF_Dictionary::EntryMatchesVisibility().

void OOF_PublicBase::hide ( bool  hideIt = true)
inlineinherited

Definition at line 52 of file oof1.h.

void dbTable::ignoreDuplicateRecords ( )
inline

Definition at line 1837 of file oof1.h.

Referenced by stIgnoreDuplicateRecords::stIgnoreDuplicateRecords().

void dbTable::import ( const char *  ansiFileName)
virtual

Definition at line 1539 of file oof1.cpp.

References deleteAll(), and insert().

bool dbTable::inDeclarativePhase ( ) const
inline

Has database been opened or are we still potentially declaring tables.

Will be true before newConnection or openConnection has been called.

Definition at line 1787 of file oof1.h.

unsigned long dbTable::insert ( std::istream &  )
virtual
void dbTable::intersection_with ( dbTable rhs)
void dbTable::intersection_with ( dbTable rhs)
inline

Definition at line 2144 of file oof1.h.

void dbTable::intersection_with ( const dbSelection rhs)
void dbTable::invert ( )
bool oofBroadcaster::isBroadcasting ( ) const
inlineinherited

Definition at line 160 of file oofmsg.h.

References oofBroadcaster::mNestedBroadcastingDepth.

bool dbTable::isCopyCompatibleWith ( const dbTable rhsTable) const
bool dbTable::isDirty ( ) const
inline
bool dbTable::isEmpty ( )
bool dbTable::isNewRecord ( ) const
inline
bool dbTable::isOpen ( ) const
inline

Definition at line 1776 of file oof1.h.

Referenced by close().

bool dbTable::isRecordLoaded ( ) const
inline
bool dbTable::isRelatedClone ( ) const
inline
bool dbTable::isTableValid ( ) const
inline
void dbTable::last ( )

Last record in the selection becomes current.

Doesn't call gotoRecord if there is nothing in the selection.

Definition at line 2199 of file oof1.cpp.

References OOF_tableBackend::count(), OOF_tableBackend::gotoRecord(), and mBackend.

Referenced by dbGUI::goLastRecord(), oofRepWindow::ListenToMessage(), and oofRepWindow::ReflowReport().

dbTable * dbTable::lhsTableInRelationshipSpec ( ) const

Definition at line 1974 of file oof1.cpp.

References dbRelRefBase::relatedTable().

Referenced by describeState(), dbQueryField::getSearchTables(), and markDirty().

bool dbTable::loadRelatedContextJoiningFromTo ( const dbField f1,
const dbField f2 
)

Change table's current loaded selection and current record to satisfy a join.

How the join is performed depends on each backend. Bit of redirection here - as a destination table, almost certainly in a relation, the field to passed in is probably a "real" field pointing back to the original table not the cloned destination of a relation. To make sure no side effects can change the original table, retrieve our copy of the field via the ordinal field number.

Definition at line 2284 of file oof1.cpp.

References oofBroadcaster::broadcast(), field(), dbField::fieldNumber(), OOF_tableBackend::loadRelatedContextJoiningFromTo(), mBackend, and OOFmsg_UnloadRecord.

bool dbTable::lockedCurrentRecord ( ) const
inline

Definition at line 2470 of file oof1.h.

Referenced by dbAbstractEditHelper::readOnly(), and dbGUI::recordAvailable().

void dbTable::lockRecord ( )
inline

Definition at line 2438 of file oof1.h.

dbSelection dbTable::makeEmptySelection ( ) const

Definition at line 2683 of file oof1.cpp.

References OOF_tableBackend::makeEmptySelection(), and mBackend.

Referenced by dbBrowseHelper::highlightedSelection().

dbView * dbTable::makeView ( )
virtual
void dbTable::markDirty ( )
bool dbTable::more ( ) const
inline
oofString dbTable::name ( ) const
virtual

Reimplemented from OOF_PublicBase.

Definition at line 1125 of file oof1.cpp.

References tableName().

void dbTable::newRecord ( )
virtual
void dbTable::next ( )
inline
void dbTable::noticeDuplicateRecords ( )
inline

Definition at line 1830 of file oof1.h.

Referenced by stIgnoreDuplicateRecords::~stIgnoreDuplicateRecords().

fieldNumT dbTable::numFields ( ) const
inline
unsigned int dbTable::numFiles ( ) const
inline

Definition at line 1857 of file oof1.h.

Referenced by dbConnect_ctree::BuildConnectionSchemas().

unsigned int dbTable::numIndexes ( ) const
inline

Definition at line 1850 of file oof1.h.

Referenced by dbConnect_ctree::BuildConnectionSchemas().

oidT dbTable::oidOfRecord ( unsigned long  recno)
inline
bool dbTable::openTableInConnection ( const dbConnect theDB,
const bool  createIfMissing = false 
)
void dbTable::operator! ( )
inline

Operator performing invert set operation.

Definition at line 2184 of file oof1.h.

void dbTable::operator%= ( dbTable rhs)
inline

Operator performing difference_with set operation.

Definition at line 2127 of file oof1.h.

void dbTable::operator%= ( dbTable rhs)
inline

Operator performing difference_with set operation.

Definition at line 2137 of file oof1.h.

void dbTable::operator%= ( const dbSelection rhs)
inline

Operator performing difference_with set operation.

Definition at line 2117 of file oof1.h.

void dbTable::operator&= ( dbTable rhs)
inline

Operator performing intersection_with set operation.

Definition at line 2154 of file oof1.h.

void dbTable::operator&= ( dbTable rhs)
inline

Operator performing intersection_with set operation.

Definition at line 2174 of file oof1.h.

void dbTable::operator&= ( const dbSelection rhs)
inline

Operator performing intersection_with set operation.

Definition at line 2164 of file oof1.h.

void dbTable::operator+= ( dbTable rhs)
inline

Operator performing union_with set operation.

Definition at line 2218 of file oof1.h.

void dbTable::operator+= ( dbTable rhs)
inline

Operator performing union_with set operation.

Definition at line 2238 of file oof1.h.

void dbTable::operator+= ( const dbSelection rhs)
inline

Operator performing union_with set operation.

Definition at line 2228 of file oof1.h.

bool dbTable::operator+= ( oidT  rhs)
inline

Operator performing addOIDtoSelection set operation like union_with.

Definition at line 2278 of file oof1.h.

void dbTable::operator-= ( dbTable rhs)
inline

Operator performing difference_with set operation.

Definition at line 2097 of file oof1.h.

void dbTable::operator-= ( dbTable rhs)
inline

Operator performing difference_with set operation.

Definition at line 2087 of file oof1.h.

void dbTable::operator-= ( const dbSelection rhs)
inline

Operator performing difference_with set operation.

Definition at line 2107 of file oof1.h.

dbTableAssigner dbTable::operator<< ( const char *  inString)
inline

Create dbTableAssigner as fast way to create and set entire record.

Allows you to pass in all fields as text strings, eg:

People << "Andy" << "Dent" << "37";

Definition at line 2292 of file oof1.h.

const dbSelection & dbTable::operator= ( const dbSelection rhs)

Definition at line 2744 of file oof1.cpp.

References setSelection().

dbTable & dbTable::operator= ( const dbTable rhs)

Definition at line 1647 of file oof1.cpp.

References copyRecFrom().

void dbTable::operator|= ( dbTable rhs)
inline

Operator performing union_with set operation.

Definition at line 2258 of file oof1.h.

void dbTable::operator|= ( dbTable rhs)
inline

Operator performing union_with set operation.

Definition at line 2248 of file oof1.h.

void dbTable::operator|= ( const dbSelection rhs)
inline

Operator performing union_with set operation.

Definition at line 2268 of file oof1.h.

void dbTable::operator~ ( )
inline

Operator performing invert set operation.

Definition at line 2194 of file oof1.h.

void dbTable::pack ( )
inline

Definition at line 2463 of file oof1.h.

bool dbTable::pointsToBackend ( const OOF_tableBackend rhsBackend) const

Definition at line 1408 of file oof1.cpp.

References mBackend.

void dbTable::postCloneRecordCleanup ( )
virtual

Definition at line 1673 of file oof1.cpp.

References dbField::clear(), field(), dbField::fieldType(), mFieldCount, numFields(), and relationshipField.

Referenced by cloneRecord().

void dbTable::postCloneTableCleanup ( )
void dbTable::prev ( )
inline

Previous record in the selection becomes current.

Definition at line 1997 of file oof1.h.

Referenced by dbGUI::goPrevRecord(), and oofRepWindow::ListenToMessage().

dbTable * dbTable::prototype ( ) const
inline
void dbTable::rebuild ( )

Definition at line 1173 of file oof1.cpp.

References mBackend, and OOF_tableBackend::rebuild().

Referenced by OOF_ctreeKeywordIndex::rebuild().

unsigned long dbTable::recordNumber ( ) const
inline
unsigned long dbTable::recordNumber ( const dbQueryClause qClause,
bool *  outFoundIt = 0 
) const
inline

Definition at line 2063 of file oof1.h.

unsigned long dbTable::recordNumber ( const dbQueryClause qClause,
bool *  outFoundIt = 0 
) const
inline

Definition at line 2070 of file oof1.h.

unsigned long dbTable::recordNumberOfOID ( oidT  inOID)
inline

Find ordinal position in ordered selection of record by OID.

Parameters
inOIDidentifier (commonly record address) of desired record
Todo:
decide if should return standard enum value for not found.

Definition at line 2056 of file oof1.h.

Referenced by dbFieldPickLink::copyFieldToLink().

void dbTable::relateAllDeletables ( )
bool dbTable::relateSelectionFrom ( dbTable lhs)
bool dbTable::reloadRecord ( )
void oofBroadcaster::removeReceiver ( const oofReceiver rcvrPtr)
inherited
void dbTable::removeSelection ( const dbSelection inSel)
void dbTable::resumeSorting ( )
void dbTable::revertRecord ( )
virtual
void dbTable::saveRecord ( )
virtual
bool dbTable::search ( const dbQueryClause query)
bool dbTable::search ( const dbQueryClause query)

Definition at line 2326 of file oof1.cpp.

References search().

bool dbTable::searchSelContainsAllDelimited ( const dbField schField,
const char *  schStr,
char  delim 
)
bool dbTable::searchSelContainsAllOf ( const dbField schField,
const char **  schStrs,
unsigned long  count 
)

Definition at line 2422 of file oof1.cpp.

References isTableValid(), mBackend, and OOF_tableBackend::searchSelContainsAllOf().

Referenced by searchSelContainsAllOf().

bool dbTable::searchSelContainsAllOf ( const dbField schField,
oofWordParser inParser 
)
bool dbTable::searchSelContainsAnyDelimited ( const dbField schField,
const char *  schStr,
char  delim 
)
bool dbTable::searchSelContainsAnyOf ( const dbField schField,
const char **  schStrs,
unsigned long  count 
)

Definition at line 2396 of file oof1.cpp.

References isTableValid(), mBackend, and OOF_tableBackend::searchSelContainsAnyOf().

Referenced by searchSelContainsAnyOf().

bool dbTable::searchSelContainsAnyOf ( const dbField schField,
oofWordParser inParser 
)
bool dbTable::searchSelection ( const dbQueryClause query)
bool dbTable::searchSelection ( const dbQueryClause query)

Definition at line 2337 of file oof1.cpp.

References searchSelection().

void dbTable::selectAll ( )
inline

Change the current selection to all records.

This state is explicitly tracked as it allows backends to maintain an optimal representation, eg: not needing to retain a list of record pointers.

Definition at line 2304 of file oof1.h.

References OOFmsg_ChangeSelection.

Referenced by appendSelection(), deleteAll(), dbAbstractBrowseHelper::deleteSelection(), dbConnect::dumpData(), dbFieldPickLink::InitLookup(), and insert().

bool dbTable::selectAllRelated ( bool  broadcastChange = true)

Definition at line 1928 of file oof1.cpp.

References dbRelRefBase::selectAllRelated().

void dbTable::selectJustCurrent ( )
inline

Change the current selection to just the current record.

This makes a selection behave like a single object.

Definition at line 2427 of file oof1.h.

References OOFmsg_ChangeSelection.

Referenced by cloneRecord().

bool dbTable::selectJustOID ( oidT  inOID)

Try to change the current selection to just the matching record.

This makes a selection behave like a single object.

Parameters
inOIDis a unique record address. Zero input is allowed but causes selectNone(). If it fails, behaviour is like selectNone().
Returns
true if there is a matching oid, false if no match or zero input
Todo:
pass address of inOID when change broadcast to take void*

Definition at line 2705 of file oof1.cpp.

References oofBroadcaster::broadcast(), describeState(), mBackend, OOFmsg_ChangeSelection, OOF_tableBackend::selectJustOID(), and selectNone().

Referenced by OOF_RelMN::appendSelection(), OOF_mixOutlineItem::GetDrawContentsFromView(), OOF_RelMN::removeSelection(), OOF_mixOutlineItem::selectItemRecord(), OOF_simpleRecordBackend::SortSelectionInverseNow(), OOF_simpleRecordBackend::sortSelectionNow(), and OOF_simpleRecordBackend::SortSelectionNow().

void dbTable::selectNone ( )
inline

Change the current selection to no records.

This empty set is what would be returned by an unsuccessful search().

See also
isEmpty()

Definition at line 2321 of file oof1.h.

References OOFmsg_ChangeSelection.

Referenced by clearSelection(), dbAbstractBrowseHelper::deleteSelection(), deleteSelection(), relateSelectionFrom(), removeSelection(), dbRelRefBase::selectAllRelated(), and selectJustOID().

unsigned long dbTable::sequenceNumber ( ) const
inline

Definition at line 1843 of file oof1.h.

void dbTable::setDefaultWordParser ( oofWordParser inParser)

Definition at line 1142 of file oof1.cpp.

void dbTable::setFileExtensions ( const char *  dataExt,
const char *  indexExt 
)
inline

Definition at line 2408 of file oof1.h.

void dbTable::setName ( const char *  inName)
inline

Definition at line 2401 of file oof1.h.

Referenced by OOF_repXMLschemaVisitor::UniquifyTables().

void dbTable::setReverseSortOrder ( const dbField theField)

Definition at line 2472 of file oof1.cpp.

References setSortOrder().

void dbTable::setSaveOption ( const saveOptionsT  inOpt)
void dbTable::setSelection ( const dbSelection rhs)
void dbTable::setSelection ( const OOF_Selection rhs)
void dbTable::setShortImports ( bool  allowShorties)

Definition at line 1532 of file oof1.cpp.

References mAllowShortImports.

void dbTable::setSortOrder ( const dbField theField,
bool  shouldReverse = false 
)
void dbTable::setSortOrder ( const dbSorter srt)
void dbTable::setTableValid ( bool  validState = true)
inline
dbSorter * dbTable::sorter ( ) const
inline
void dbTable::sortNow ( ) const

Definition at line 2479 of file oof1.cpp.

References mBackend, sorter(), and dbSorter::sortNow().

void dbTable::start ( )
void dbTable::stats ( std::ostream &  )
virtual

Definition at line 1797 of file oof1.cpp.

References countAll(), oofString::isEmpty(), and mTableName.

Referenced by dbConnect::stats().

void dbTable::stillCurrentlyConstructing ( )
void dbTable::suppressIndices ( )

Definition at line 1208 of file oof1.cpp.

References mBackend, and OOF_tableBackend::suppressIndices().

Referenced by OOF_ctreeKeywordIndex::suppressIndices().

void dbTable::suspendSorting ( )
bool dbTable::tableCachesDirtyRecords ( ) const
inline

Definition at line 2383 of file oof1.h.

References bufferForever, and requireExplicitAndBuffer.

Referenced by markDirty().

const oofString & dbTable::tableName ( ) const
inline
tableNumT dbTable::tableNumber ( ) const
inline
dbTable::saveOptionsT dbTable::tableSaveOption ( ) const
inline
oofString dbTable::tableSingularName ( ) const
virtual

Definition at line 2690 of file oof1.cpp.

References mTableName, and oofString::singular().

bool dbTable::transactionDirty ( )
inline

Definition at line 2456 of file oof1.h.

Referenced by dbGUI::leaveRecord().

void dbTable::union_with ( dbTable rhs)
void dbTable::union_with ( dbTable rhs)
inline

Definition at line 2201 of file oof1.h.

void dbTable::union_with ( const dbSelection rhs)
void dbTable::union_with_no_overlap ( dbTable rhs)
void dbTable::union_with_no_overlap ( dbTable rhs)
inline

Definition at line 2208 of file oof1.h.

void dbTable::union_with_no_overlap ( const dbSelection rhs)
void dbTable::unloadRecord ( )
void dbTable::unlockRecord ( )
inline

Definition at line 2447 of file oof1.h.

Referenced by dbGUI::leaveRecord().

void dbTable::unSorted ( )

Definition at line 2439 of file oof1.cpp.

References mBackend, and OOF_tableBackend::setSortOrder().

int dbTable::validatingDepth ( ) const
inline

Definition at line 1809 of file oof1.h.

dbTable::tableValidT dbTable::validStatus ( ) const
inline

Definition at line 1802 of file oof1.h.

Friends And Related Function Documentation

friend class dbConnect
friend

Definition at line 819 of file oof1.h.

friend class dbConnect_ram
friend

Definition at line 820 of file oof1.h.

friend class dbConnect_ramp
friend

Definition at line 821 of file oof1.h.

friend class dbField
friend

Definition at line 818 of file oof1.h.

friend class dbRelHalf
friend

Definition at line 822 of file oof1.h.

friend class dbRelRefBase
friend

Definition at line 823 of file oof1.h.

friend class OOF_tableBackend
friend

Definition at line 824 of file oof1.h.

friend class oofE_Table
friend

Definition at line 826 of file oof1.h.

Member Data Documentation

bool dbTable::mAllowShortImports
protected

Definition at line 794 of file oof1.h.

Referenced by allowsShortImports(), insert(), and setShortImports().

OOF_tableBackend* dbTable::mBackend
protected
fieldNumT dbTable::mFieldCount
protected
OOF_Dictionary dbTable::mFields
protected

Definition at line 789 of file oof1.h.

Referenced by attachfield(), describe(), extract(), and makeView().

dbGUI* dbTable::mGUI
protected

Definition at line 797 of file oof1.h.

Referenced by dbTable(), and getGUI().

bool OOF_PublicBase::mHidden
protectedinherited

Definition at line 61 of file oof1.h.

bool oofBroadcaster::mLostReceiversWhileBroadcasting
protectedinherited

simple flag that removeReceiver was called during nested broadcast

Definition at line 98 of file oofmsg.h.

Referenced by oofBroadcaster::broadcast(), and oofBroadcaster::removeReceiver().

unsigned long oofBroadcaster::mNestedBroadcastingDepth
protectedinherited

aid to debugging and removeReceiver

Definition at line 97 of file oofmsg.h.

Referenced by oofBroadcaster::broadcast(), oofBroadcaster::isBroadcasting(), and oofBroadcaster::removeReceiver().

OOF_ExpandableLongArray* oofBroadcaster::mReceivers
protectedinherited
saveOptionsT dbTable::mSaveOption
protected

Definition at line 793 of file oof1.h.

Referenced by setSaveOption(), and setSelection().

oofString dbTable::mTableName
protected

Definition at line 790 of file oof1.h.

Referenced by buildSchema(), describe(), describeState(), stats(), and tableSingularName().

tableNumT dbTable::mTableNumber
protected

Definition at line 791 of file oof1.h.

Referenced by dbConnect::attachTable().

tableValidT dbTable::mTableValid
protected

Definition at line 795 of file oof1.h.

Referenced by close(), dbTable(), describeState(), and search().

int dbTable::mValidatingDepth
protected

Definition at line 796 of file oof1.h.

dbTable * dbTable::sCurrentlyConstructing
staticprotected

The documentation for this class was generated from the following files: