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

ResourceIterator Class Reference

#include <Allocatn.h>

Collaboration diagram for ResourceIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterate through all resources assigned to a given area.

An iterator which iterates through the resources assigned to a given area. Conceptually, returns a pair (R,T) of (resource, time allocated here). Thus "resource 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

 ResourceIterator (const Allocation &p_allocation, const int p_area_num)
 Frm an allocation & an area, make an iterator for resources assigned there.

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

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

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

bool atEnd (void) const
 Returns true iff the iterator is at the end of the list.

int getArea (void) const

Protected Attributes

const AllocationmyAllocation
ResourceAssignmentcurrent
 The current resource + time pair for this area.

const int myArea


Constructor & Destructor Documentation

ResourceIterator::ResourceIterator const Allocation p_allocation,
const int  p_area_num
 

Frm an allocation & an area, make an iterator for resources assigned there.

Constructor that takes an allocation (could be any sub type) and an area number and finds the first resource assigned to that area in this allocation. Uses whatever definition of "first" the allocation defined when it implemented firstRes(area).

ResourceIterator::~ResourceIterator  ) 
 

Destructor: clean up memory allocated in "current".

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


Member Function Documentation

bool ResourceIterator::atEnd void   )  const
 

Returns true iff the iterator is at the end of the list.

Author : Andre Oboler

ResourceAssignment ResourceIterator::operator * void   )  const
 

Returns the object pointed to by this iterator.

Rewritten: Andre Oboler (ASO)

void ResourceIterator::operator++ void   ) 
 

Increments the iterator to the next resource assigned to this area.

Author : Michael Eldridge Rewritten: Andre Oboler (ASO)


Member Data Documentation

const int ResourceIterator::myArea [protected]
 

This value may not change


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