![]() | ||||||
#include <Allocatn.h>
Collaboration diagram for ResourceIterator:

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 Allocation & | myAllocation |
| ResourceAssignment * | current |
| The current resource + time pair for this area. | |
| const int | myArea |
|
||||||||||||
|
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). |
|
|
Destructor: clean up memory allocated in "current". Author: Charles Twardy 18apr03, for bug spotted by GT. |
|
|
Returns true iff the iterator is at the end of the list. Author : Andre Oboler |
|
|
Returns the object pointed to by this iterator. Rewritten: Andre Oboler (ASO) |
|
|
Increments the iterator to the next resource assigned to this area. Author : Michael Eldridge Rewritten: Andre Oboler (ASO) |
|
|
This value may not change |
| (SARBayes) | Main | Related Pages | Class List | Hierarchy | Methods | Files |
|---|