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

ResourceAssignment Class Reference

#include <containr.h>

List of all members.


Detailed Description

An assignment giving a resource and a time. It must belong to an area.

Logically a tuple (resource, time), ResourceAssignment is a pair of numbers belonging to an area, naming a resource number and the duration for which that resource has been assigned (to the area). An area can have many ResourceAssignments.

Author : Michael Eldridge

Definition at line 130 of file containr.h.

Public Member Functions

 ResourceAssignment (const int p_resourceNum, const double p_time)
 Constructor for the ResourceAssignment given (resourceNum, time).

 ResourceAssignment (const ResourceAssignment &p_resAssignment)
 Copy constructor for ResourceAssignment.

int getResourceNum (void) const
 Returns the resource number stored in this ResourceAssignment.

double getTime (void) const
 Returns the time stored in this ResourceAssignment object.


Private Member Functions

ResourceAssignment & operator= (const ResourceAssignment &p_resAssignment)

Private Attributes

const int resourceNum
 The resource number part of this tuple. Immutable copy frm Allocation.

const double time
 The time part of this tuple. Immutable copy from Allocation.


Constructor & Destructor Documentation

ResourceAssignment::ResourceAssignment const int    p_resourceNum,
const double    p_time
 

Constructor for the ResourceAssignment given (resourceNum, time).

Stores the resource number and the time. Does no error checking. (Hmmm...)

Author : Michael Eldridge

Definition at line 66 of file con_res.cpp.

ResourceAssignment::ResourceAssignment const ResourceAssignment &    p_resAssignment
 

Copy constructor for ResourceAssignment.

Author : Charles Twardy

Definition at line 76 of file con_res.cpp.


Member Function Documentation

int ResourceAssignment::getResourceNum void    const
 

Returns the resource number stored in this ResourceAssignment.

Author : Michael Eldridge

Definition at line 90 of file con_res.cpp.

References resourceNum.

Referenced by Allocation::calcCoverage(), matches(), ResourceIterator::operator *(), ResourceIterator::operator++(), printAssignments(), and UserDef::UserDef().

double ResourceAssignment::getTime void    const
 

Returns the time stored in this ResourceAssignment object.

Author : Michael Eldridge

Definition at line 102 of file con_res.cpp.

References time.

Referenced by Allocation::calcCoverage(), matches(), ResourceIterator::operator *(), printAssignments(), and UserDef::UserDef().


Member Data Documentation

const int ResourceAssignment::resourceNum [private]
 

The resource number part of this tuple. Immutable copy frm Allocation.

The (resource number, time) tuple stored in this object contains copies of the values stored in the relevant Allocation object. This object does not allow these values to be modified because this could potentially cause confusion: people would think they were modifying the assignments stored in the Allocation object itself, but they would not actually be doing so.

Definition at line 160 of file containr.h.

Referenced by getResourceNum().


The documentation for this class was generated from the following files:
Generated on Fri May 9 17:04:33 2003 for SORAL by dOxygen 1.3-rc3
(SARBayes) Main Related Pages Class List Hierarchy Methods Files