PDC
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CheckoutArea Class Reference

Public Member Functions

 CheckoutArea (int sz=DFLT_REGISTERS)
 
 CheckoutArea (const CheckoutArea &ca)
 
 ~CheckoutArea ()
 
CheckoutAreaoperator= (const CheckoutArea &ca)
 
Registeroperator[] (int indx)
 
void advanceTime (int t)
 
int getSize ()
 

Protected Attributes

Registerreg
 
int size
 

Private Member Functions

void copy (const CheckoutArea &ca)
 

Detailed Description

Represents a checkout area with multiple registers.

Constructor & Destructor Documentation

CheckoutArea::CheckoutArea ( int  sz = DFLT_REGISTERS)
inline

default and one-argument constructor

CheckoutArea::CheckoutArea ( const CheckoutArea ca)
inline

copy constructor

CheckoutArea::~CheckoutArea ( )
inline

Member Function Documentation

void CheckoutArea::advanceTime ( int  t)
inline

Advance the simulation of each Register in reg[] by a specified amount of time

Parameters
tnon-negative number of units of time to advance the Registers
void CheckoutArea::copy ( const CheckoutArea ca)
inlineprivate

Helper method

Parameters
caCheckoutArea object to be copied to this CheckoutArea
int CheckoutArea::getSize ( )
inline
CheckoutArea& CheckoutArea::operator= ( const CheckoutArea ca)
inline

assignment operator

Register& CheckoutArea::operator[] ( int  indx)
inline

Index operator

Parameters
indxIndex of Register object to return
Returns
Register object whose index is indx
Precondition
0 <= indx <= size

Member Data Documentation

Register* CheckoutArea::reg
protected

Represents all register objects in the simulation

int CheckoutArea::size
protected

Count of registers available in this simulation


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