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

dbView Class Reference

#include <oofview.h>

Inheritance diagram for dbView:

Inheritance graph
[legend]
Collaboration diagram for dbView:

Collaboration graph
[legend]
List of all members.

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.


Public Types

enum  { kDefExpansionChunk = 10 }

Public Member Functions

 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 dbViewoperator= (const dbView &)
 ~dbView ()
virtual dbViewclone (bool keepIndependentSelection=false) const
void cloneTable (bool shareSelection=false)
void extract (std::ostream &)
dbViewappend (const dbField &)
 Append field to view, cloning standalone fields or using append(dbField*).

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

dbViewappend (dbField *)
 Append field to view, using AppendOwnedField or cloning as appropriate.

dbViewappend (const char *)
dbViewoperator<< (const dbField &)
dbViewoperator<< (const dbField *)
dbViewoperator<< (dbField *)
dbViewoperator<< (const char *)
const dbFieldfield (unsigned int) const
dbFieldwriteableField (unsigned int) const
dbTabletable () const
dbTablesource () const
void name (const oofString &)
oofString name () const
oofString getHeading (unsigned int, bool *tellIfOverride=0) const
oofString currentHeading () const
unsigned long recordNumber () const
const dbFielddefaultFindField () const
bool defaultFindFieldSpecified () const
fieldNumT defaultFindFieldNo () const
void defaultFindFieldNo (fieldNumT)
void setHeading (unsigned int, const char *)
bool willSuppressHeadings () const
void suppressHeadings (bool willSuppress=true)
OOF_Dictionary clone () const
OOF_bitPointeroperator[] (unsigned int)
OOF_bitPointeroperator[] (const char *)
OOF_bitPointerlookupByAttribute (const char *attributeValue, const char *attributeType=0)
OOF_bitPointeritem (unsigned int index)
OOF_bitPointer value (unsigned int index) const
OOF_bitPointeroperator() ()
void append (OOF_bitPointer)
OOF_bitPointer pop ()
void reset ()
unsigned int iter () const
void start ()
bool more () const
void next ()
unsigned int count () const
void startVisible (bool wantVisible=true)
bool moreVisible (bool wantVisible=true)
void nextVisible (bool wantVisible=true)
unsigned int countVisible (bool wantVisible=true)
bool allObjectsMatch (OOF_Dictionary &)
void deleteAll ()
virtual void describe (std::ostream &) const
virtual void describeVisible (std::ostream &, bool wantVisible) const
void ownsContents (bool ownsFlag=true)
void colSizer (oofColSizer *adoptedSizer)
oofColSizercolSizer ()

Static Public Member Functions

OOF_bitPointermissingItem ()

Protected Member Functions

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

Protected Attributes

OOF_DictRepmRep
unsigned int mInternalIter
bool mOwnsContents

Static Protected Attributes

OOF_bitPointer sMissingItem


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumeration values:
kDefExpansionChunk 


Constructor & Destructor Documentation

dbView::dbView  ) 
 

dbView::dbView dbTable ,
bool  cloneSource = true
 

dbView::dbView dbTable ,
bool  cloneSource = true
 

dbView::dbView dbRelRefBase ,
bool  cloneSource = false
 

dbView::dbView dbRelRefBase ,
bool  cloneSource = false
 

dbView::dbView const dbView ,
bool  keepIndependentSelection = false
 

dbView::dbView const dbView ,
dbTable
 

dbView::~dbView  ) 
 


Member Function Documentation

void dbView::AdjustFieldsToNewTable  )  [protected]
 

bool OOF_Dictionary::allObjectsMatch OOF_Dictionary  )  [inherited]
 

void OOF_Dictionary::append OOF_bitPointer   )  [inline, inherited]
 

dbView & dbView::append const char *   ) 
 

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.

dbView & dbView::append const dbField rhs  ) 
 

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

dbView & dbView::append const dbField rhs  ) 
 

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

void dbView::AppendOwnedField dbField adoptedField  )  [protected]
 

OOF_Dictionary OOF_Dictionary::clone  )  const [inherited]
 

dbView * dbView::clone bool  keepIndependentSelection = false  )  const [virtual]
 

void dbView::cloneTable bool  shareSelection = false  ) 
 

oofColSizer * OOF_mixColSizable::colSizer  )  [inherited]
 

void OOF_mixColSizable::colSizer oofColSizer adoptedSizer  )  [inherited]
 

unsigned int OOF_Dictionary::count  )  const [inline, inherited]
 

unsigned int OOF_Dictionary::countVisible bool  wantVisible = true  )  [inherited]
 

oofString dbView::currentHeading  )  const
 

const dbField & dbView::defaultFindField  )  const
 

void dbView::defaultFindFieldNo fieldNumT   )  [inline]
 

fieldNumT dbView::defaultFindFieldNo  )  const [inline]
 

bool dbView::defaultFindFieldSpecified  )  const [inline]
 

void OOF_Dictionary::deleteAll  )  [inherited]
 

void OOF_Dictionary::describe std::ostream &   )  const [virtual, inherited]
 

void OOF_Dictionary::describeVisible std::ostream &  ,
bool  wantVisible
const [virtual, inherited]
 

bool OOF_Dictionary::EntryMatchesVisibility const OOF_PublicBase ,
bool 
const [inline, protected, inherited]
 

void dbView::extract std::ostream &   ) 
 

const dbField & dbView::field unsigned  int  )  const [inline]
 

void dbView::FinishCopy const dbView rhs  )  [protected]
 

oofString dbView::getHeading unsigned  int,
bool *  tellIfOverride = 0
const
 

OOF_bitPointer & OOF_Dictionary::item unsigned int  index  )  [inline, inherited]
 

unsigned int OOF_Dictionary::iter  )  const [inline, inherited]
 

OOF_bitPointer & OOF_Dictionary::lookupByAttribute const char *  attributeValue,
const char *  attributeType = 0
[inline, inherited]
 

oofColSizer * dbView::MakeDefaultSizer unsigned int  numCols = 0  )  const [protected, virtual]
 

Reimplemented from OOF_mixColSizable.

OOF_bitPointer & OOF_Dictionary::missingItem  )  [inline, static, inherited]
 

bool OOF_Dictionary::more  )  const [inline, inherited]
 

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!.

oofString dbView::name  )  const
 

void dbView::name const oofString  )  [inline]
 

void OOF_Dictionary::next  )  [inline, inherited]
 

void OOF_Dictionary::nextVisible bool  wantVisible = true  )  [inline, inherited]
 

OOF_bitPointer & OOF_Dictionary::operator()  )  [inline, inherited]
 

dbView & dbView::operator<< const char *   )  [inline]
 

dbView & dbView::operator<< dbField  )  [inline]
 

dbView & dbView::operator<< const dbField  )  [inline]
 

dbView & dbView::operator<< const dbField  )  [inline]
 

const dbView & dbView::operator= const dbView  ) 
 

OOF_bitPointer & OOF_Dictionary::operator[] const char *   )  [inline, inherited]
 

OOF_bitPointer & OOF_Dictionary::operator[] unsigned  int  )  [inline, inherited]
 

void OOF_Dictionary::ownsContents bool  ownsFlag = true  )  [inline, inherited]
 

OOF_bitPointer OOF_Dictionary::pop  )  [inline, inherited]
 

unsigned long dbView::recordNumber  )  const [inline]
 

void OOF_Dictionary::reset  )  [inline, inherited]
 

void dbView::setHeading unsigned  int,
const char * 
 

dbTable * dbView::source  )  const [inline]
 

void OOF_Dictionary::start  )  [inline, inherited]
 

void OOF_Dictionary::startVisible bool  wantVisible = true  )  [inline, inherited]
 

void dbView::suppressHeadings bool  willSuppress = true  )  [inline]
 

dbTable * dbView::table  )  const [inline]
 

OOF_bitPointer OOF_Dictionary::value unsigned int  index  )  const [inline, inherited]
 

bool dbView::willSuppressHeadings  )  const [inline]
 

dbField * dbView::writeableField unsigned  int  )  const [inline]
 


Member Data Documentation

unsigned int OOF_Dictionary::mInternalIter [protected, inherited]
 

bool OOF_Dictionary::mOwnsContents [protected, inherited]
 

OOF_DictRep* OOF_Dictionary::mRep [protected, inherited]
 

OOF_bitPointer OOF_Dictionary::sMissingItem [static, protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 1 22:08:54 2004 for OOFILE by doxygen 1.3.5