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

Store RAM-resident cache of records, eg: OOF_simpleRecordBackend::mDirtyRecordCache. More...

#include <oofrecs.h>

Collaboration diagram for OOF_recordCache:
Collaboration graph
[legend]

Public Types

enum  { kNotFound =ULONG_MAX }
 

Public Member Functions

bool anyDeleted () const
 
void append (OOF_recordBufferedContext *adoptingContext)
 
unsigned long containsContext (const OOF_recordBufferedContext *) const
 
unsigned long containsOffset (unsigned long recOffset) const
 
unsigned long count () const
 
unsigned long countNew () const
 
unsigned long countOccupied () const
 
void deleteAll ()
 
void deleteRecord (unsigned long recOffset)
 
unsigned long firstFree () const
 
OOF_recordBufferedContextitem (unsigned long)
 
 OOF_recordCache ()
 
 OOF_recordCache (OOF_recordBufferedContext *)
 
OOF_recordBufferedContextorphanBuffer (unsigned long)
 
void reuseDeletedItem (unsigned long, OOF_recordBufferedContext *adoptingContext)
 
void setItem (unsigned long, OOF_recordBufferedContext *adoptingContext)
 
 ~OOF_recordCache ()
 

Protected Attributes

OOF_ExpandableLongArray mBuffers
 
unsigned short mDeletedCells
 

Detailed Description

Store RAM-resident cache of records, eg: OOF_simpleRecordBackend::mDirtyRecordCache.

Todo:
copy ctor OOF_recordCache(const OOF_recordCache &rhs)

Definition at line 76 of file oofrecs.h.

Constructor & Destructor Documentation

OOF_recordCache::OOF_recordCache ( )

Definition at line 113 of file oofrec4.cpp.

OOF_recordCache::OOF_recordCache ( OOF_recordBufferedContext buf)

Definition at line 118 of file oofrec4.cpp.

References append().

OOF_recordCache::~OOF_recordCache ( )

Definition at line 125 of file oofrec4.cpp.

References OOF_ExpandableLongArray::count(), mBuffers, and dbConnect::raise().

Member Function Documentation

bool OOF_recordCache::anyDeleted ( ) const
inline

Definition at line 808 of file oofrecs.h.

References mDeletedCells.

Referenced by OOF_ramBackend::gotoRecord().

void OOF_recordCache::append ( OOF_recordBufferedContext adoptingContext)
unsigned long OOF_recordCache::containsContext ( const OOF_recordBufferedContext inCtx) const
unsigned long OOF_recordCache::containsOffset ( unsigned long  recOffset) const
unsigned long OOF_recordCache::count ( ) const
inline
unsigned long OOF_recordCache::countNew ( ) const
unsigned long OOF_recordCache::countOccupied ( ) const
inline
void OOF_recordCache::deleteAll ( )
void OOF_recordCache::deleteRecord ( unsigned long  recOffset)
unsigned long OOF_recordCache::firstFree ( ) const

Definition at line 175 of file oofrec4.cpp.

References OOF_ExpandableLongArray::find(), kNotFound, mBuffers, and mDeletedCells.

Referenced by OOF_ramBackend::SaveContext().

OOF_recordBufferedContext * OOF_recordCache::item ( unsigned long  index)
OOF_recordBufferedContext * OOF_recordCache::orphanBuffer ( unsigned long  cellNo)
void OOF_recordCache::reuseDeletedItem ( unsigned long  index,
OOF_recordBufferedContext adoptingContext 
)

Definition at line 149 of file oofrec4.cpp.

References mBuffers, mDeletedCells, setItem(), and OOF_ExpandableLongArray::value().

Referenced by OOF_ramBackend::SaveContext().

void OOF_recordCache::setItem ( unsigned long  index,
OOF_recordBufferedContext adoptingContext 
)

Definition at line 142 of file oofrec4.cpp.

References mBuffers.

Referenced by reuseDeletedItem().

Member Data Documentation

OOF_ExpandableLongArray OOF_recordCache::mBuffers
protected
unsigned short OOF_recordCache::mDeletedCells
protected

Definition at line 108 of file oofrecs.h.

Referenced by anyDeleted(), countOccupied(), deleteRecord(), firstFree(), and reuseDeletedItem().


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