OOFILE  1.9
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
dbView Class Reference

Provide an iterable set of fields. More...

#include <oofview.h>

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

Public Types

enum  { kDefExpansionChunk =10 }
 

Public Member Functions

bool allObjectsMatch (OOF_Dictionary &)
 
dbViewappend (const dbField &)
 Append field to view, cloning standalone fields or using append(dbField*). More...
 
dbViewappend (const dbField *)
 Append field to view, using append(dbField*). More...
 
dbViewappend (dbField *)
 Append field to view, using AppendOwnedField or cloning as appropriate. More...
 
dbViewappend (const char *)
 
void append (OOF_bitPointer)
 
virtual dbViewclone (bool keepIndependentSelection=false) const
 
OOF_Dictionary clone () const
 
void cloneTable (bool shareSelection=false)
 
void colSizer (oofColSizer *adoptedSizer)
 
oofColSizercolSizer ()
 
unsigned int count () const
 
unsigned int countVisible (bool wantVisible=true)
 
oofString currentHeading () const
 
 dbView ()
 
 dbView (dbTable *, bool cloneSource=true)
 
 dbView (dbTable &, bool cloneSource=true)
 
 dbView (dbRelRefBase *, bool cloneSource=false)
 
 dbView (dbRelRefBase &, bool cloneSource=false)
 
 dbView (const dbView &, bool keepIndependentSelection=false)
 
 dbView (const dbView &, dbTable *)
 
const dbFielddefaultFindField () const
 
fieldNumT defaultFindFieldNo () const
 
void defaultFindFieldNo (fieldNumT)
 
bool defaultFindFieldSpecified () const
 
void deleteAll ()
 
virtual void describe (std::ostream &) const
 
virtual void describeVisible (std::ostream &, bool wantVisible) const
 
void extract (std::ostream &)
 
const dbFieldfield (unsigned int) const
 
oofString getHeading (unsigned int, bool *tellIfOverride=0) const
 
OOF_bitPointeritem (unsigned int index)
 
unsigned int iter () const
 
OOF_bitPointerlookupByAttribute (const char *attributeValue, const char *attributeType=0)
 
bool more () const
 
bool moreVisible (bool wantVisible=true)
 
void name (const oofString &)
 
oofString name () const
 
void next ()
 
void nextVisible (bool wantVisible=true)
 
OOF_bitPointeroperator() ()
 
dbViewoperator<< (const dbField &)
 
dbViewoperator<< (const dbField *)
 
dbViewoperator<< (dbField *)
 
dbViewoperator<< (const char *)
 
const dbViewoperator= (const dbView &)
 
OOF_bitPointeroperator[] (unsigned int)
 
OOF_bitPointeroperator[] (const char *)
 
void ownsContents (bool ownsFlag=true)
 
OOF_bitPointer pop ()
 
unsigned long recordNumber () const
 
void reset ()
 
void setHeading (unsigned int, const char *)
 
dbTablesource () const
 
void start ()
 
void startVisible (bool wantVisible=true)
 
void suppressHeadings (bool willSuppress=true)
 
dbTabletable () const
 
OOF_bitPointer value (unsigned int index) const
 
bool willSuppressHeadings () const
 
dbFieldwriteableField (unsigned int) const
 
 ~dbView ()
 

Static Public Member Functions

static OOF_bitPointermissingItem ()
 

Protected Member Functions

void AdjustFieldsToNewTable ()
 
void AppendOwnedField (dbField *adoptedField)
 
bool EntryMatchesVisibility (const OOF_PublicBase *, bool) const
 
void FinishCopy (const dbView &rhs)
 
virtual oofColSizerMakeDefaultSizer (unsigned int numCols=0) const
 

Protected Attributes

unsigned int mInternalIter
 
bool mOwnsContents
 
OOF_DictRepmRep
 

Static Protected Attributes

static OOF_bitPointer sMissingItem
 

Detailed Description

Provide an iterable set of fields.

A dbView can be created without a dbTable in which case it will iterate just once. This is very useful for creating a set of fields for an oofRepViewBand.

Note
you can attach standalone fields like oofChar to have a constant displayed alongside variable data. You can even then get exotic by having this standalone field calculated by a dbCalculator so you effectively have a function attached to the list.

Definition at line 26 of file oofview.h.

Constructor & Destructor Documentation

dbView::dbView ( )

Definition at line 35 of file oofview.cpp.

Referenced by clone().

dbView::dbView ( dbTable tbl,
bool  cloneSource = true 
)

Definition at line 44 of file oofview.cpp.

References dbTable::cloneTableSharingSelection(), and dbTable::isRelatedClone().

dbView::dbView ( dbTable tbl,
bool  cloneSource = true 
)

Definition at line 65 of file oofview.cpp.

References dbTable::cloneTableSharingSelection(), and dbTable::isRelatedClone().

dbView::dbView ( dbRelRefBase tblRef,
bool  cloneSource = false 
)

Definition at line 81 of file oofview.cpp.

References dbRelRefBase::relatedTable().

dbView::dbView ( dbRelRefBase tblRef,
bool  cloneSource = false 
)

Definition at line 95 of file oofview.cpp.

References dbRelRefBase::relatedTable().

dbView::dbView ( const dbView rhs,
bool  keepIndependentSelection = false 
)
dbView::dbView ( const dbView rhs,
dbTable newTable 
)

Definition at line 129 of file oofview.cpp.

References FinishCopy(), table(), and dbTable::tableNumber().

dbView::~dbView ( )

Member Function Documentation

void dbView::AdjustFieldsToNewTable ( )
protected
bool OOF_Dictionary::allObjectsMatch ( OOF_Dictionary rhs)
inherited

Definition at line 470 of file oof2.cpp.

References OOF_Dictionary::count(), and OOF_Dictionary::mRep.

dbView & dbView::append ( const dbField rhs)

Append field to view, cloning standalone fields or using append(dbField*).

Definition at line 328 of file oofview.cpp.

References AppendOwnedField(), dbField::clone(), and dbField::fieldIsStandalone().

Referenced by append(), operator<<(), and operator<<().

dbView & dbView::append ( const dbField rhs)

Append field to view, using append(dbField*).

Definition at line 377 of file oofview.cpp.

References append(), and dbField::fieldIsStandalone().

dbView & dbView::append ( dbField rhs)

Append field to view, using AppendOwnedField or cloning as appropriate.

Fields are cloned when we have already cloned the main table (mCloneSource==true) so we can iterate it without disturbing the original. We map fields across to the equivalent field on our main table when we've cloned or if it's just a user specification error - they have specified the field from a clone of the wrong table. This is an easy mistake to make in application code - coping in here makes life a lot easier, and we take advantage of that in dbFieldPickLink::copyFieldToLink.

Definition at line 351 of file oofview.cpp.

References OOF_Dictionary::append(), AppendOwnedField(), dbField::equivalentFieldFromTable(), dbField::fieldIsStandalone(), dbField::fieldTable(), and dbTable::tableNumber().

dbView & dbView::append ( const char *  rhs)

Definition at line 386 of file oofview.cpp.

References AppendOwnedField().

void OOF_Dictionary::append ( OOF_bitPointer  aBit)
inlineinherited
void dbView::AppendOwnedField ( dbField adoptedField)
protected
dbView * dbView::clone ( bool  keepIndependentSelection = false) const
virtual

Definition at line 145 of file oofview.cpp.

References dbView().

OOF_Dictionary OOF_Dictionary::clone ( ) const
inherited

Definition at line 389 of file oof2.cpp.

References OOF_Dictionary::mRep.

void dbView::cloneTable ( bool  shareSelection = false)
void OOF_mixColSizable::colSizer ( oofColSizer adoptedSizer)
inherited
oofColSizer * OOF_mixColSizable::colSizer ( )
inherited

Definition at line 79 of file oofsize.cpp.

References OOF_mixColSizable::MakeDefaultSizer().

unsigned int OOF_Dictionary::count ( ) const
inlineinherited

Definition at line 1498 of file oof1.h.

Referenced by oofRepViewRedirectingRender::AddRowInteractionAreas(), AdjustFieldsToNewTable(), OOF_Dictionary::allObjectsMatch(), AppendOwnedField(), dbConnect::attachTable(), dbBrowseHelper::browseViewWithTable(), OOF_ramBackend::BuildBackendtables(), OOF_dbaseBackend::BuildBackendtables(), OOF_ctreeBackend::BuildBackendtables(), oofRepViewBand_WinRender::CalcColHeaderWrapping(), oofRepViewBand_MacRender::CalcColHeaderWrapping(), dbConnect::copyAllFrom(), dbAbstractEditHelper::copyFieldsToLinks(), dbAbstractEditHelper::copyLinksToFields(), OOF_Dictionary::countVisible(), OOF_dbaseBackend::createTableInConnection(), OOF_mixColumnarBand::customDrawer(), OOF_Dictionary::deleteAll(), dbConnect::deleteAll(), dbHierBrowseHelper::deleteAllLevels(), dbConnect::deleteStorage(), OOF_Dictionary::describe(), OOF_Dictionary::describeVisible(), oofRepGraphBand_CSVRender::draw(), oofRepGraphBand_TSVRender::draw(), oofRepViewBand_HTMLRender::draw(), oofRepViewBand_CSVRender::draw(), oofRepViewBand_TSVRender::draw(), oofRepViewBand_WinRender::draw(), oofRepViewBand_MacRender::draw(), oofRepViewBand_RTFRender::draw(), dbRepChar::drawColumnar(), oofRepViewBand_CSVRender::drawColumnHeaders(), oofRepViewBand_TSVRender::drawColumnHeaders(), oofRepViewBand_WinRender::drawColumnHeaders(), oofRepViewBand_MacRender::drawColumnHeaders(), oofRepViewBand_RTFRender::drawColumnHeaders(), oofRepViewBand_WinRender::DrawContinuingOverPage(), oofRepViewBand_MacRender::DrawContinuingOverPage(), dbRepChar::drawHeader(), dbRepChar::drawPageWise(), dbConnect::dumpData(), extract(), dbRep::extract(), oofSerializableFactory::factoryMatching(), oofRepViewBand_MacRender::finishConstruction(), dbRepChar::formatForCharStream(), dbConnect::generateTestData(), OOF_mixOutlineItem::GetDrawContentsFromView(), dbAbstractEditHelper::getLink(), dbViewAsTableStorage::GetStorageSize(), OOF_mixColumnarBand::hasCustomViewDrawers(), dbListBoxDisplay::loadData(), dbConnect::MakeAllTablesValid(), dbConnect_ram::MakeTableBackend(), oofRepViewBand::numCols(), oofRepColHeaderEditLink::oofRepColHeaderEditLink(), oofRepViewEditLink::oofRepViewEditLink(), dbAbstractEditHelper::readOnly(), dbAbstractEditHelper::ResetDirtyLinks(), dbConnect::resumeSorting(), OOF_simpleRecordBackend::saveRecord(), oofXMLDBWriter::startSchema(), dbConnect::stats(), dbConnect::suspendSorting(), OOF_repXMLschemaVisitor::UniquifyTables(), dbAbstractEditHelper::updateDerivedFieldDisplays(), dbAbstractEditHelper::ValidateLinks(), OOF_repEditSetupVisitor::VisitIterableBandBody(), OOF_repBufferSettingVisitor::VisitView(), OOF_repXMLlayoutVisitor::WriteColumns(), oofXMLDBWriter::writeRecord(), dbConnect::~dbConnect(), dbConnect_ram::~dbConnect_ram(), and OOF_dbaseBackend::~OOF_dbaseBackend().

unsigned int OOF_Dictionary::countVisible ( bool  wantVisible = true)
inherited
oofString dbView::currentHeading ( ) const
const dbField & dbView::defaultFindField ( ) const
fieldNumT dbView::defaultFindFieldNo ( ) const
inline

Definition at line 183 of file oofview.h.

void dbView::defaultFindFieldNo ( fieldNumT  inNum)
inline

Definition at line 190 of file oofview.h.

bool dbView::defaultFindFieldSpecified ( ) const
inline

Definition at line 176 of file oofview.h.

void OOF_Dictionary::deleteAll ( )
inherited
void OOF_Dictionary::describe ( std::ostream &  ) const
virtualinherited

Definition at line 446 of file oof2.cpp.

References OOF_Dictionary::count(), and OOF_Dictionary::value().

Referenced by dbTable::describe(), and dbConnect::describe().

void OOF_Dictionary::describeVisible ( std::ostream &  ,
bool  wantVisible 
) const
virtualinherited
bool OOF_Dictionary::EntryMatchesVisibility ( const OOF_PublicBase entry,
bool  wantVisible 
) const
inlineprotectedinherited
void dbView::extract ( std::ostream &  )
const dbField & dbView::field ( unsigned int  fieldNoInView) const
inline
void dbView::FinishCopy ( const dbView rhs)
protected
oofString dbView::getHeading ( unsigned int  fieldNoInView,
bool *  tellIfOverride = 0 
) const
OOF_bitPointer & OOF_Dictionary::item ( unsigned int  index)
inlineinherited

Definition at line 1587 of file oof1.h.

Referenced by OOF_Dictionary::deleteAll(), and oofSerializableFactory::factoryMatching().

unsigned int OOF_Dictionary::iter ( ) const
inlineinherited

Definition at line 1491 of file oof1.h.

Referenced by dbConnect::dumpData(), dbTable::extract(), and dbTable::makeView().

OOF_bitPointer & OOF_Dictionary::lookupByAttribute ( const char *  attributeValue,
const char *  attributeType = 0 
)
inlineinherited

Definition at line 1615 of file oof1.h.

oofColSizer * dbView::MakeDefaultSizer ( unsigned int  numCols = 0) const
protectedvirtual

Reimplemented from OOF_mixColSizable.

Definition at line 455 of file oofview.cpp.

OOF_bitPointer & OOF_Dictionary::missingItem ( )
inlinestaticinherited

Definition at line 1622 of file oof1.h.

bool OOF_Dictionary::more ( ) const
inlineinherited
bool OOF_Dictionary::moreVisible ( bool  wantVisible = true)
inherited
Bug:
Think because entry is redeclared inside the loop that may fail if no visible entries - pass 0 in to EntryMatchesVisibility and deref null ptr!.

Definition at line 415 of file oof2.cpp.

References OOF_Dictionary::EntryMatchesVisibility(), OOF_Dictionary::more(), OOF_Dictionary::next(), and OOF_Dictionary::operator()().

Referenced by dbConnect::dumpData(), dbTable::extract(), and dbTable::makeView().

void dbView::name ( const oofString inName)
inline
oofString dbView::name ( ) const

Definition at line 239 of file oofview.cpp.

References oofString::isEmpty(), and dbTable::tableName().

void OOF_Dictionary::next ( )
inlineinherited
void OOF_Dictionary::nextVisible ( bool  wantVisible = true)
inlineinherited

Definition at line 1543 of file oof1.h.

Referenced by dbConnect::dumpData(), dbTable::extract(), and dbTable::makeView().

OOF_bitPointer & OOF_Dictionary::operator() ( )
inlineinherited

Definition at line 1572 of file oof1.h.

Referenced by OOF_Dictionary::moreVisible().

dbView & dbView::operator<< ( const dbField rhs)
inline

Definition at line 130 of file oofview.h.

References append().

dbView & dbView::operator<< ( const dbField rhs)
inline

Definition at line 146 of file oofview.h.

References append().

dbView & dbView::operator<< ( dbField rhs)
inline

Definition at line 138 of file oofview.h.

References append().

dbView & dbView::operator<< ( const char *  rhs)
inline

Definition at line 154 of file oofview.h.

References append().

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

Definition at line 205 of file oofview.cpp.

OOF_bitPointer & OOF_Dictionary::operator[] ( unsigned int  index)
inlineinherited

Definition at line 1608 of file oof1.h.

OOF_bitPointer & OOF_Dictionary::operator[] ( const char *  name)
inlineinherited

Definition at line 1601 of file oof1.h.

void OOF_Dictionary::ownsContents ( bool  ownsFlag = true)
inlineinherited
OOF_bitPointer OOF_Dictionary::pop ( )
inlineinherited

Definition at line 1558 of file oof1.h.

Referenced by oofXMLschemaParser::endElement().

unsigned long dbView::recordNumber ( ) const
inline
void OOF_Dictionary::reset ( )
inlineinherited

Definition at line 1565 of file oof1.h.

void dbView::setHeading ( unsigned int  fieldNoInView,
const char *  inHead 
)

Definition at line 308 of file oofview.cpp.

References OOF_ExpandableLongArray::value().

Referenced by FinishCopy(), and oofRepColHeaderEditLink::setCellText().

dbTable * dbView::source ( ) const
inline
void OOF_Dictionary::start ( )
inlineinherited
void OOF_Dictionary::startVisible ( bool  wantVisible = true)
inlineinherited

Definition at line 1535 of file oof1.h.

Referenced by dbConnect::dumpData(), dbTable::extract(), and dbTable::makeView().

void dbView::suppressHeadings ( bool  willSuppress = true)
inline

Definition at line 169 of file oofview.h.

dbTable * dbView::table ( ) const
inline

Definition at line 109 of file oofview.h.

Referenced by dbHierBrowseHelper::appendLevel(), dbBrowseHelper::appendSelection(), dbBrowseHelper::browseViewWithListBox(), dbBrowseHelper::browseViewWithTable(), dbBrowseHelper::clearSelection(), dbBrowseHelper::currentSelection(), dbView(), dbAbstractBrowseHelper::deleteSelection(), oofRepGraphBand_CSVRender::draw(), oofRepGraphBand_TSVRender::draw(), oofRepViewEditLink::enterLink(), dbViewAsTableStorage::FindCellData(), OOF_mixOutlineItem::findOIDforData(), dbHierBrowseHelper::FirstOIDBelowItem(), oofRepViewEditLink::getCellText(), OOF_mixOutlineItem::GetDrawContentsFromView(), dbBrowseHelper::gotoHighlightedRecord(), dbHierBrowseHelper::highlightedOID(), dbBrowseHelper::highlightedOID(), dbBrowseHelper::highlightedSelection(), dbBrowseHelper::highlightRecNo(), dbHierBrowseHelper::IncludeAllBelowItem(), dbHierBrowseHelper::insertItemsBelow(), oofRepViewBand::lastRow(), oofRepViewBand::more(), oofRepViewBand::next(), oofRepData::oofRepData(), oofRepViewEditLink::oofRepViewEditLink(), dbBrowseHelper::receiveMsg(), dbAbstractBrowseHelper::receiveMsg(), dbBrowseHelper::refreshBrowser(), dbBrowseHelper::removeSelection(), OOF_mixOutlineItem::selectItemRecord(), oofRepViewEditLink::setCellText(), dbGUIAdaptLPopupButton::setValueList(), oofRepViewBand::start(), dbAbstractBrowseHelper::table(), OOF_repXMLschemaVisitor::UniquifyTables(), dbBrowseHelper::updateBrowserSelection(), OOF_repEditSetupVisitor::VisitIterableBandBody(), OOF_repBufferSettingVisitor::VisitView(), and oofXMLDBWriter::writeDatabase().

OOF_bitPointer OOF_Dictionary::value ( unsigned int  index) const
inlineinherited
bool dbView::willSuppressHeadings ( ) const
inline

Definition at line 162 of file oofview.h.

Referenced by dbBrowseHelper::dbBrowseHelper().

dbField * dbView::writeableField ( unsigned int  fieldNoInView) const
inline

Member Data Documentation

unsigned int OOF_Dictionary::mInternalIter
protectedinherited

Definition at line 214 of file oof1.h.

Referenced by currentHeading().

bool OOF_Dictionary::mOwnsContents
protectedinherited

Definition at line 215 of file oof1.h.

Referenced by OOF_Dictionary::~OOF_Dictionary().

OOF_DictRep* OOF_Dictionary::mRep
protectedinherited
OOF_bitPointer OOF_Dictionary::sMissingItem
staticprotectedinherited

Definition at line 216 of file oof1.h.


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