SAR<em>bayes</em>: SORAL Documentation
(SARBayes) Main Related Pages Class List Hierarchy Methods Files

ActiveAreasIterator Class Reference

#include <Allocatn.h>

Collaboration diagram for ActiveAreasIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterate through those areas that have something assigned to them.

An iterator that iterates through all and only those areas which have resources assigned to them. Like the other iterators, it uses accessor functions defined in Allocatn.h and implemented in each allocation class.

Author : Michael Eldridge


Public Member Functions

 ActiveAreasIterator (const Allocation &p_allocation)
 From an allocation create an object to iterate over assigned (active) areas.

 ~ActiveAreasIterator ()
 Destructor: clean up memory allocated in "current".

ActiveArea operator * (void) const
 Returns the object pointed to by this iterator.

void operator++ (void)
 Increments the iterator to the next active (ie assigned) area.

bool atEnd (void) const
 Checks to see whether the iterator is at the end of the list.


Protected Attributes

const AllocationmyAllocation
ActiveAreacurrent


Constructor & Destructor Documentation

ActiveAreasIterator::ActiveAreasIterator const Allocation p_allocation  ) 
 

From an allocation create an object to iterate over assigned (active) areas.

Constructor that takes an allocation (could be any sub type) and then allows the user to iterates over ONLY the areas which have any resources assigned to them. (And all of those.)

The new object begins with the first active area in this allocation.

NOTE: Unlike the other iterators, this one only returns the area number

WARNING: Does not check to make sure it got passed a proper allocation.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)

ActiveAreasIterator::~ActiveAreasIterator  ) 
 

Destructor: clean up memory allocated in "current".

Author: Charles Twardy 18apr03, for bug spotted by GT.


Member Function Documentation

bool ActiveAreasIterator::atEnd void   )  const
 

Checks to see whether the iterator is at the end of the list.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)

ActiveArea ActiveAreasIterator::operator * void   )  const
 

Returns the object pointed to by this iterator.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)

void ActiveAreasIterator::operator++ void   ) 
 

Increments the iterator to the next active (ie assigned) area.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)


Member Data Documentation

ActiveArea* ActiveAreasIterator::current [protected]
 

The current area being pointed to

const Allocation& ActiveAreasIterator::myAllocation [protected]
 

This will be an instance of some child class of the virtual Allocation class


The documentation for this class was generated from the following files:
Generated on Tue Jul 29 03:09:36 2003 for SORAL by dOxygen 1.3.2
(SARBayes) Main Related Pages Class List Hierarchy Methods Files