OOFILE  1.9
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

base class for user arrays. More...

#include <oofarray.h>

Inheritance diagram for oofArray:
Inheritance graph
[legend]

Public Member Functions

unsigned long count () const
 
bool more () const
 
void next ()
 
 oofArray (unsigned long slotSize, unsigned long numSlots=0, unsigned int expandBySlots=4)
 
 oofArray (const oofArray &rhs)
 
oofArrayoperator= (const oofArray &)
 
void start ()
 
virtual ~oofArray ()
 

Protected Member Functions

virtual void * AllocBits (unsigned long) const =0
 
unsigned long AllocSlot ()
 
virtual void * CloneBits () const
 
virtual void DeleteBits (bool becauseExpanding)=0
 
void ExpandToInclude (unsigned long indexToCover)
 
bool Invariant () const
 Guarantee members managing storage are consistent. More...
 

Protected Attributes

void * mBits
 
unsigned int mExpansionChunk
 
unsigned long mInternalIter
 
unsigned long mNextFreeEntry
 
unsigned long mNumSlots
 
unsigned long mSlotSize
 
void ** mUserStorage
 

Detailed Description

base class for user arrays.

used instead of templatizing arrays. Works very much like OOF_ExpandableLongArray.

Definition at line 76 of file oofarray.h.

Constructor & Destructor Documentation

oofArray::oofArray ( unsigned long  slotSize,
unsigned long  numSlots = 0,
unsigned int  expandBySlots = 4 
)

Definition at line 289 of file oofarray.cpp.

References mExpansionChunk.

oofArray::oofArray ( const oofArray rhs)

Definition at line 308 of file oofarray.cpp.

References CloneBits(), and mBits.

oofArray::~oofArray ( )
virtual

Definition at line 319 of file oofarray.cpp.

References mBits.

Member Function Documentation

virtual void* oofArray::AllocBits ( unsigned  long) const
protectedpure virtual
unsigned long oofArray::AllocSlot ( )
protected
void * oofArray::CloneBits ( ) const
protectedvirtual

Definition at line 350 of file oofarray.cpp.

References AllocBits(), mBits, mNumSlots, mSlotSize, and OOF_MEM_DEBUG_FORCE_POOL_CHECK.

Referenced by oofArray(), and operator=().

unsigned long oofArray::count ( ) const
inline
virtual void oofArray::DeleteBits ( bool  becauseExpanding)
protectedpure virtual
void oofArray::ExpandToInclude ( unsigned long  indexToCover)
protected
bool oofArray::Invariant ( ) const
inlineprotected

Guarantee members managing storage are consistent.

Note: we assume a user may cause mInternalIter to go out of bounds.

Definition at line 183 of file oofarray.h.

References mBits, mNextFreeEntry, and mNumSlots.

Referenced by ExpandToInclude(), and operator=().

bool oofArray::more ( ) const
inline

Definition at line 204 of file oofarray.h.

References mInternalIter, and mNextFreeEntry.

void oofArray::next ( )
inline

Definition at line 211 of file oofarray.h.

References mInternalIter.

oofArray & oofArray::operator= ( const oofArray rhs)
void oofArray::start ( )
inline

Definition at line 197 of file oofarray.h.

References mInternalIter.

Member Data Documentation

void* oofArray::mBits
protected
unsigned int oofArray::mExpansionChunk
protected

Definition at line 106 of file oofarray.h.

Referenced by ExpandToInclude(), oofArray(), and operator=().

unsigned long oofArray::mInternalIter
protected

Definition at line 105 of file oofarray.h.

Referenced by more(), next(), operator=(), and start().

unsigned long oofArray::mNextFreeEntry
protected

Definition at line 105 of file oofarray.h.

Referenced by AllocSlot(), count(), ExpandToInclude(), Invariant(), more(), and operator=().

unsigned long oofArray::mNumSlots
protected

Definition at line 105 of file oofarray.h.

Referenced by AllocSlot(), CloneBits(), ExpandToInclude(), Invariant(), and operator=().

unsigned long oofArray::mSlotSize
protected

Definition at line 105 of file oofarray.h.

Referenced by CloneBits(), and ExpandToInclude().

void** oofArray::mUserStorage
protected

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