Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RESOURCE Class Reference

#include <resource.h>

Inheritance diagram for RESOURCE:

Inheritance graph
[legend]
Collaboration diagram for RESOURCE:

Collaboration graph
[legend]
List of all members.

Public Types

typedef vector< RESOURCE * > PTRLIST

Public Methods

 RESOURCE (char *id, char *name)
double efficiency ()
void setEfficiency (double e)
double rate ()
void setRate (double r)
bool IsAvailable (int start, int finish)
bool IsUsed (int dayNo)
bool reverseIsAvailable (int start, int finish)
void AddNote (const string &note)
NOTE_ITERATOR begin_notes ()
NOTE_ITERATOR end_notes ()
void addTimeBlock (TASK *r, int start, int finish, TimeBlock::Type type)
ResourceTimeBlockIterator begin_booked ()
ResourceTimeBlockIterator end_booked ()
void addReverseTimeBlock (TASK *r, int start, int finish, TimeBlock::Type type)
ResourceTimeBlockIterator begin_rbooked ()
ResourceTimeBlockIterator end_rbooked ()
const char * id () const
void setId (const char *)
 Usefull to compute a complex id (after creation). More...

const char * name () const

Static Public Methods

void setDefaultRate (double rate)
double defaultRate ()

Public Attributes

int is_group
PTRLIST belongs_to
 if it belongs to groups - the parents. More...

PTRLIST contains
 if it's a group of resources - its children. More...


Private Methods

void Error (char *fmt,...)

Private Attributes

double mEfficiency
 scale to apply to task durations. More...

double mRate
 dollars per day for this resource if different from default! More...

NOTES mNotes
 notes about this resource. More...

ResourceTimeBlockList mBooked
ResourceTimeBlockList mRbooked

Static Private Attributes

double sDefaultRate = -1.0
 default cost per unit time. More...


Member Typedef Documentation

typedef vector<RESOURCE *> RESOURCE::PTRLIST
 

Definition at line 31 of file resource.h.


Constructor & Destructor Documentation

RESOURCE::RESOURCE char *    id,
char *    name
 

Definition at line 27 of file resource.cc.

References is_group, mEfficiency, and mRate.


Member Function Documentation

void RESOURCE::AddNote const string &    note
 

Definition at line 109 of file resource.cc.

References mNotes.

Referenced by Project::ResourceNote().

void RESOURCE::addReverseTimeBlock TASK   r,
int    start,
int    finish,
TimeBlock::Type    type
 

Definition at line 120 of file resource.cc.

References mRbooked, and TimeBlock::Type.

Referenced by Project::ReverseBookResource().

void RESOURCE::addTimeBlock TASK   r,
int    start,
int    finish,
TimeBlock::Type    type
 

Definition at line 114 of file resource.cc.

References mBooked, and TimeBlock::Type.

Referenced by Project::BookResource().

ResourceTimeBlockIterator RESOURCE::begin_booked   [inline]
 

Definition at line 47 of file resource.h.

References mBooked, and ResourceTimeBlockIterator.

Referenced by Project::BookResource(), Reporter::HTMLReport(), Reporter::PrintPeriod(), Reporter::PrintResourcePeriod(), Project::ResourceIsUsedForTask(), and Reporter::TexReport().

NOTE_ITERATOR RESOURCE::begin_notes   [inline]
 

Definition at line 43 of file resource.h.

References mNotes, and NOTE_ITERATOR.

Referenced by Reporter::HTMLReport(), Reporter::TexReport(), and Reporter::XMLReport().

ResourceTimeBlockIterator RESOURCE::begin_rbooked   [inline]
 

Definition at line 50 of file resource.h.

References mRbooked, and ResourceTimeBlockIterator.

Referenced by Project::ReverseBookResource().

double RESOURCE::defaultRate   [inline, static]
 

Definition at line 60 of file resource.h.

References sDefaultRate.

Referenced by Project::SetProjectRate().

double RESOURCE::efficiency   [inline]
 

Definition at line 35 of file resource.h.

References mEfficiency.

Referenced by Project::AssignResource(), Project::FindEarliestResource(), Project::ReverseAssignResource(), Project::WorkBlock(), and Reporter::XMLReport().

ResourceTimeBlockIterator RESOURCE::end_booked   [inline]
 

Definition at line 48 of file resource.h.

References mBooked, and ResourceTimeBlockIterator.

Referenced by Project::BookResource(), Reporter::HTMLReport(), Reporter::PrintPeriod(), Reporter::PrintResourcePeriod(), Project::ResourceIsUsedForTask(), and Reporter::TexReport().

NOTE_ITERATOR RESOURCE::end_notes   [inline]
 

Definition at line 44 of file resource.h.

References mNotes, and NOTE_ITERATOR.

Referenced by Reporter::HTMLReport(), Reporter::TexReport(), and Reporter::XMLReport().

ResourceTimeBlockIterator RESOURCE::end_rbooked   [inline]
 

Definition at line 51 of file resource.h.

References mRbooked, and ResourceTimeBlockIterator.

Referenced by Project::ReverseBookResource().

void RESOURCE::Error char *    fmt,
...   
[private]
 

Definition at line 37 of file resource.cc.

References NAMED_ID::id().

Referenced by rate(), setEfficiency(), and setRate().

const char* NAMED_ID::id   const [inline, inherited]
 

Definition at line 29 of file namedid.h.

References NAMED_ID::mId.

Referenced by Project::AddTask(), Project::AssignResource(), Project::AssignTask(), Project::BookResource(), TASK::Error(), Error(), Reporter::findCellInColumn(), Project::FirstFreeTime(), Reporter::HardSchedule(), Reporter::HTMLCostReport(), Reporter::HTMLReport(), NAMED_ID::NAMED_ID(), CompareTaskResources::operator()(), Project::PredictOverruns(), Reporter::PrintResourcePeriod(), Project::printTaskList(), Project::ResourceIsUsedForTask(), Project::ReverseAssignResource(), Project::ReverseAssignTask(), Project::ReverseBookResource(), NAMED_ID::setId(), Reporter::SlippageReport(), Reporter::TaskGraph(), Reporter::TeXCostReport(), Reporter::TexReport(), Reporter::TextReport(), Reporter::UtilGraph(), Project::Vacation(), Project::WorkBlock(), Reporter::write_chart(), Reporter::write_milestones(), and Reporter::XMLReport().

bool RESOURCE::IsAvailable int    start,
int    finish
 

Definition at line 74 of file resource.cc.

References mBooked, and ResourceTimeBlockIterator.

Referenced by Project::AssignResource(), Project::BookResource(), Project::FirstFreeTime(), and IsUsed().

bool RESOURCE::IsUsed int    dayNo
 

Definition at line 88 of file resource.cc.

References IsAvailable().

Referenced by Reporter::UtilGraph().

const char* NAMED_ID::name   const [inline, inherited]
 

Definition at line 31 of file namedid.h.

References NAMED_ID::mName.

Referenced by Reporter::HTMLCostReport(), Reporter::HTMLReport(), NAMED_ID::NAMED_ID(), Reporter::PrintPeriod(), Reporter::PrintResourcePeriod(), Reporter::SlippageReport(), Reporter::TaskGraph(), Reporter::TeXCostReport(), Reporter::TexReport(), Reporter::TextReport(), Reporter::write_chart(), Reporter::write_milestones(), and Reporter::XMLReport().

double RESOURCE::rate  
 

Definition at line 133 of file resource.cc.

References Error(), mRate, and sDefaultRate.

Referenced by setDefaultRate(), TASK::timeCost(), and Reporter::XMLReport().

bool RESOURCE::reverseIsAvailable int    start,
int    finish
 

Definition at line 94 of file resource.cc.

References mRbooked, and ResourceTimeBlockIterator.

Referenced by Project::ReverseAssignResource(), and Project::ReverseBookResource().

void RESOURCE::setDefaultRate double    rate [static]
 

Definition at line 128 of file resource.cc.

References rate(), and sDefaultRate.

Referenced by Project::SetProjectRate().

void RESOURCE::setEfficiency double    e
 

Definition at line 51 of file resource.cc.

References Error(), and mEfficiency.

Referenced by Project::SetEfficiency().

void NAMED_ID::setId const char *    [inherited]
 

Usefull to compute a complex id (after creation).

Definition at line 33 of file namedid.cc.

References NAMED_ID::id(), and NAMED_ID::mId.

Referenced by NAMED_ID::NAMED_ID(), and VACATION::VACATION().

void RESOURCE::setRate double    r
 

Definition at line 61 of file resource.cc.

References Error(), and mRate.

Referenced by Project::SetResourceRate().


Member Data Documentation

PTRLIST RESOURCE::belongs_to
 

if it belongs to groups - the parents.

Definition at line 56 of file resource.h.

Referenced by Project::AddGroup(), Project::BookResource(), Reporter::PrintResourcePeriod(), and Project::ReverseBookResource().

PTRLIST RESOURCE::contains
 

if it's a group of resources - its children.

Definition at line 57 of file resource.h.

Referenced by Project::AddGroup(), Project::BookResource(), Reporter::HTMLReport(), Project::ReverseBookResource(), Reporter::TexReport(), Reporter::TextReport(), and Reporter::XMLReport().

int RESOURCE::is_group
 

Definition at line 55 of file resource.h.

Referenced by Project::AddGroup(), Project::BookResource(), Reporter::HTMLReport(), Reporter::PrintPeriod(), Reporter::PrintResourcePeriod(), RESOURCE(), Project::ReverseBookResource(), Reporter::TexReport(), Reporter::TextReport(), Project::Vacation(), and Reporter::XMLReport().

ResourceTimeBlockList RESOURCE::mBooked [private]
 

Definition at line 69 of file resource.h.

Referenced by addTimeBlock(), begin_booked(), end_booked(), and IsAvailable().

double RESOURCE::mEfficiency [private]
 

scale to apply to task durations.

Definition at line 63 of file resource.h.

Referenced by efficiency(), RESOURCE(), and setEfficiency().

NOTES RESOURCE::mNotes [private]
 

notes about this resource.

Definition at line 67 of file resource.h.

Referenced by AddNote(), begin_notes(), and end_notes().

double RESOURCE::mRate [private]
 

dollars per day for this resource if different from default!

Definition at line 65 of file resource.h.

Referenced by rate(), RESOURCE(), and setRate().

ResourceTimeBlockList RESOURCE::mRbooked [private]
 

Definition at line 70 of file resource.h.

Referenced by addReverseTimeBlock(), begin_rbooked(), end_rbooked(), and reverseIsAvailable().

double RESOURCE::sDefaultRate = -1.0 [static, private]
 

default cost per unit time.

Definition at line 126 of file resource.cc.

Referenced by defaultRate(), rate(), and setDefaultRate().


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 22:24:05 2004 for Opensched by doxygen1.2.15