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

AreaIterator Class Reference

#include <Allocatn.h>

Collaboration diagram for AreaIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterate through all area assignments for a given resource.

An iterator which iterates through the area assignments for a specified resource. Conceptually, returns a pair (A,T) of (area, duration assigned there), thus "area iterator".

Like the other iterators, it uses accessor functions defined in Allocatn.h and implemented in each allocation class.

Author : Michael Eldridge


Public Member Functions

 AreaIterator (const Allocation &p_allocation, const int p_resource_num)
 Create an iterator over the areas for that resource.

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

void operator++ (void)
 Increments the iterator to the next area for this resource.

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

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

int getResource (void) const

Protected Attributes

const AllocationmyAllocation
 The allocation being iterated over.

AreaAssignmentcurrent
 The current area + time pair for this resource.

const int myResource
 The resource for which we're reading assignments.


Constructor & Destructor Documentation

AreaIterator::AreaIterator const Allocation p_allocation,
const int  p_resource_num
 

Create an iterator over the areas for that resource.

Constructor that takes an allocation (could be any sub type) and a resource number and creates an iterator over all areas that have that resource allocated to them, returning AreaAssignments. It begins with the first area to which that resource has been assigned, as implemented by the specific allocation type being called.

AreaIterator::~AreaIterator  ) 
 

Destructor: clean up memory allocated in "current".

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


Member Function Documentation

bool AreaIterator::atEnd void   )  const
 

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

Author : Michael Eldridge

AreaAssignment AreaIterator::operator * void   )  const
 

Returns the object pointed to by this iterator.

Author : Andre Oboler (ASO)

void AreaIterator::operator++ void   ) 
 

Increments the iterator to the next area for this resource.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)


Member Data Documentation

const int AreaIterator::myResource [protected]
 

The resource for which we're reading assignments.

This value may not change


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