home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-09-27 | 6.0 KB | 376 lines | [TEXT/CWIE] |
- // COPYRIGHT 1994 A.D. Software, All rights reserved
-
- // public layer of OOFILE database
-
- // inline definitions
-
-
- // -------------------------------------------------------
- // d b C o n n e c t
- // -------------------------------------------------------
- inline bool dbConnect::underConstruction()
- {
- return sCurrentlyConstructing!=0;
- }
-
-
-
- // -------------------------------------------------------
- // d b T a b l e
- // -------------------------------------------------------
- #if 0
- inline dbTable::operator dbTable*()
- {
- return this;
- };
- #endif
-
- inline long dbTable::sequenceNumber() const
- {
- return mBackend->sequenceNumber();
- }
-
-
- inline void dbTable::buildSchema()
- {
- mBackend->buildSchema();
- }
-
-
- inline unsigned int dbTable::numIndexes() const
- {
- return mBackend->numIndexes();
- }
-
-
- inline unsigned int dbTable::numFiles() const
- {
- return mBackend->numFiles();
- }
-
-
- inline void dbTable::createTableInConnection(const dbConnect* theDB)
- {
- mBackend->createTableInConnection(theDB);
- }
-
-
- inline void dbTable::openTableInConnection(const dbConnect* theDB)
- {
- mBackend->openTableInConnection(theDB);
- }
-
-
- inline void dbTable::start()
- {
- ContextChange();
- mBackend->start();
- }
-
-
- inline bool dbTable::more() const
- {
- return mBackend->more();
- }
-
-
- inline bool dbTable::atFirst() const
- {
- return mBackend->atFirst();
- }
-
-
- inline bool dbTable::atLast() const
- {
- return mBackend->atLast();
- }
-
-
- inline void dbTable::next()
- {
- ContextChange();
- mBackend->next();
- }
-
-
- inline void dbTable::first()
- {
- ContextChange();
- mBackend->gotoRelativeRecord(0);
- }
-
-
- inline void dbTable::prev()
- {
- ContextChange();
- mBackend->prev();
- }
-
-
- inline void dbTable::last()
- {
- ContextChange();
- mBackend->gotoRelativeRecord(mBackend->count()-1);
- }
-
-
- inline unsigned long dbTable::count() const
- {
- return mBackend->count();
- }
-
-
- inline unsigned long dbTable::countAll() const
- {
- return mBackend->countAll();
- }
-
-
- inline bool dbTable::contextChangedFrom(const OOF_Context* ctx) const
- {
- return mBackend->contextChangedFrom(ctx);
- }
-
-
- inline OOF_Context* dbTable::createContext() const
- {
- return mBackend->createContext();
- }
-
-
- inline void dbTable::returnToContext(OOF_Context* ctx)
- {
- mBackend->returnToContext(ctx);
- }
-
-
- inline void dbTable::updateContext(OOF_Context* ctx) const
- {
- mBackend->updateContext(ctx);
- }
-
-
- inline bool dbTable::gotoRelativeRecord(unsigned long relativeNum)
- {
- ContextChange();
- return mBackend->gotoRelativeRecord(relativeNum);
- }
-
-
- inline bool dbTable::gotoRecord(unsigned long relativeNum)
- {
- ContextChange();
- return mBackend->gotoRecord(relativeNum);
- }
-
-
- inline unsigned long dbTable::recordNumber() const
- {
- return mBackend->recordNumber();
- }
-
-
- inline bool dbTable::searchDefaultIndex(const char* defaultIndexSearchStr)
- {
- return mBackend->searchEqual((dbField*) mFields[mSortByFieldNum], defaultIndexSearchStr); // safe downcast
- }
-
-
- inline bool dbTable::search(const dbQueryClause& query)
- {
- return mBackend->search(&query);
- }
-
-
- inline bool dbTable::searchSelection(const dbQueryClause& query)
- {
- return mBackend->searchSelection(&query);
- }
-
-
- inline void dbTable::difference_with(const dbTable& rhs)
- {
- mBackend->difference_with(rhs.mBackend);
- }
-
-
- inline void dbTable::operator-=(const dbTable& rhs)
- {
- mBackend->difference_with(rhs.mBackend);
- }
-
-
- inline void dbTable::operator%=(const dbTable& rhs)
- {
- mBackend->difference_with(rhs.mBackend);
- }
-
-
- inline void dbTable:: intersection_with(const dbTable& rhs)
- {
- mBackend->intersection_with(rhs.mBackend);
- }
-
-
- inline void dbTable:: operator&=(const dbTable& rhs)
- {
- mBackend->intersection_with(rhs.mBackend);
- }
-
-
- inline void dbTable::invert()
- {
- mBackend->invert();
- }
-
-
- inline void dbTable::operator!()
- {
- mBackend->invert();
- }
-
-
- inline void dbTable::operator~()
- {
- mBackend->invert();
- }
-
-
- inline void dbTable::union_with(const dbTable& rhs)
- {
- mBackend->union_with(rhs.mBackend);
- }
-
-
- inline void dbTable::operator+=(const dbTable& rhs)
- {
- mBackend->union_with(rhs.mBackend);
- }
-
-
- inline void dbTable::operator|=(const dbTable& rhs)
- {
- mBackend->union_with(rhs.mBackend);
- }
-
-
-
- inline void dbTable::selectAll()
- {
- mBackend->selectAll();
- }
-
-
- inline void dbTable::selectNone()
- {
- mBackend->selectNone();
- }
-
-
- inline bool dbTable::isRecordLoaded() const
- {
- return mBackend->isRecordLoaded();
- }
-
-
- inline bool dbTable::isDirty() const
- {
- return mBackend->isDirty();
- }
-
-
- inline dbField *dbTable::field(fieldNumT fieldNum)
- {
- return (dbField *) mFields[fieldNum];
- }
-
-
- inline dbField *dbTable::field(const char *fieldName)
- {
- return (dbField *) mFields[fieldName];
- }
-
-
- inline OOF_String dbTable::tableName() const
- {
- return mTableName;
- }
-
-
- inline void dbTable::setName(const char* name)
- {
- mTableName = name;
- mBackend->mTableName = name;
- }
-
-
- inline void dbTable::setOIDfield(const dbField &oidfield) const
- {
- mBackend->setOIDfield(oidfield);
- }
-
-
- //inline bool dbTable::contextChangedFrom(const OOF_Context* ctx) const
- //{
- // return mBackend->contextChangedFrom(ctx);
- //}
-
-
- //inline void dbTable::updateContext(OOF_Context* ctx) const
- //{
- // mBackend->updateContext(ctx);
- //}
-
-
- //inline OOF_Context* dbTable::createContext() const
- //{
- // return mBackend->createContext();
- //}
-
-
-
- inline void dbTable::setSaveOption(const saveOptions opt)
- {
- mSaveOption = opt;
- }
-
-
- inline void dbTable::sortBy(const dbField* fld)
- {
- sortBy(*fld);
- }
-
-
- // -------------------------------------------------------
- // O O F _ t a b l e B a c k e n d
- // -------------------------------------------------------
- inline void OOF_tableBackend::markDirty()
- {
- mDirty=true;
- }
-
-
- // -------------------------------------------------------
- // O O F _ S t r i n g
- // -------------------------------------------------------
- inline ostream& operator<<(ostream& os, OOF_String& str)
- {
- os << (char *) str;
- return os;
- }
-
-
- inline bool OOF_String::isEmpty() const
- {
- return mBody==0 || mLen==0;
- }
-
-
- // -------------------------------------------------------
- // O O F _ m i x R e l C h a i n E n d P o i n t
- // -------------------------------------------------------
- inline bool OOF_mixRelChainEndPoint::hasTransitoryLinks()
- {
- return sTransitoryRelChainLinks!=0;
- }
-