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

Reporter Class Reference

#include <reporter.h>

Collaboration diagram for Reporter:

Collaboration graph
[legend]
List of all members.

Public Types

enum  REPORTTYPE { TXT_REPORT, TEX_REPORT, HTML_REPORT }

Public Methods

 VARIABLE (int, tg_left,(int)(72 *3.5)) Reporter()
void DoReports (Project *project)
void HTMLReport (Project *project, char *filename)
void WeeklyReport (Project *project, char *filename, REPORTTYPE rep_type)
void MonthlyReport (Project *project, char *filename, REPORTTYPE rep_type)
void UtilGraph (Project *project, char *filename)
void AddTaskGraph (int d1, int d2, char *fname)
void AddNetworkDiagram (int c1, int c2, char *fname)
void checkComplete ()
void SlippageReport (Project *project)
void TextReport (Project *project, char *filename)
void XMLReport (Project *project, char *filename)
void HardSchedule (Project *project, char *filename)
void TexReport (Project *project, char *filename)
void PrintResourcePeriod (Project *project, FILE *f, RESOURCE *r, int dayNo, int lastDay, REPORTTYPE rep_type)

Private Types

typedef int(Reporter::* Pperfunc )(Project *project, int day, char *name)

Private Methods

int Wday (time_t t)
int Mday (time_t t)
void PrintPeriod (Project *project, FILE *f, int dayNo, int lastDay, char *weekName, REPORTTYPE rep_type)
void PeriodicReport (Project *project, Pperfunc IsPeriod, char *filename, REPORTTYPE rep_type)
int IsWeek (Project *project, int dayNo, char *name)
int IsMonth (Project *project, int dayNo, char *name)
void Debug (char *fmt,...)
void Error (char *fmt,...)
void Warning (char *fmt,...)
FILE * OpenOutputFile (char *filename)
char * TeXFix (char *buf, const char *txt)
char * HTMLFix (char *buf, const char *txt)
int MapX (Project *project, int dayNo, int start, int finish)
int Bound (int x, int x1, int x2)
int Offset (int x, int x1, int x2)
FILE * OpenTaskGraph (const char *filename, int x1, int y1, int x2, int y2)
void TaskGraph (Project *project, int start, int finish, const char *filename)
 Display a TaskGraph
Parameters:
project  Project to display
start  first day of the graph
finish  last day of the graph
filename  Name of the file to be ceated/overwrited.
More...


FILE * openNetworkDiagram (Project *project, const char *filename, int llx, int lly, int urx, int ury)
void write_milestones (Project *project, FILE *fp, int ax, int bx, int ay, int by)
void write_chart (Project *project, int start, int finish, const char *filename)
NETWORK_CELLfindCellInColumn (int x, const char *id)
void NetworkDiagram (Project *project, int start, int finish, const char *filename)
void constructStartFinish (Project *project)
int maximumX (Project *project)
void assignY (Project *project)
void TeXCostReport (Project *project, FILE *f)
void HTMLCostReport (Project *project, FILE *f)
void CostReport (Project *project, char *filename, REPORTTYPE rep_type)
int Month (time_t t)
int Year (time_t t)

Private Attributes

TASKmStartTask
TASKmFinishTask
char * monthNames [13]
vector< TASKGRAPH * > mTaskGraphs
vector< TASKNET * > mTaskNets

Member Typedef Documentation

typedef int(Reporter::* Reporter::Pperfunc)(Project *project, int day, char *name) [private]
 

Definition at line 173 of file reporter.h.


Member Enumeration Documentation

enum Reporter::REPORTTYPE
 

Enumeration values:
TXT_REPORT 
TEX_REPORT 
HTML_REPORT 

Definition at line 61 of file reporter.h.


Member Function Documentation

void Reporter::AddNetworkDiagram int    c1,
int    c2,
char *    fname
 

Definition at line 170 of file loadfile.cc.

References Error(), and mTaskNets.

Referenced by ProjectFile::Load().

void Reporter::AddTaskGraph int    d1,
int    d2,
char *    fname
 

Definition at line 162 of file loadfile.cc.

References mTaskGraphs.

Referenced by ProjectFile::AddTaskGraph().

void Reporter::assignY Project   project [private]
 

Definition at line 123 of file network.cc.

References Project::beginTaskList(), Project::endTaskList(), Error(), NETWORK_CELL::isSpace, maximumX(), NETWORK_CELL::next, nextAvailableY(), numX, numY, TASK::ny, NETWORK_CELL::prev, NETWORK_CELL::task, and Project::TPLCI.

Referenced by NetworkDiagram().

int Reporter::Bound int    x,
int    x1,
int    x2
[private]
 

Definition at line 31 of file graph.cc.

Referenced by Offset().

void Reporter::checkComplete  
 

Definition at line 394 of file loadfile.cc.

Referenced by ProjectFile::checkComplete().

void Reporter::constructStartFinish Project   project [private]
 

Definition at line 33 of file network.cc.

References mFinishTask, mStartTask, Project::networkFinishY(), Project::networkStartY(), numX, TASK::nx, TASK::ny, and TASK::setStart().

Referenced by NetworkDiagram().

void Reporter::CostReport Project   project,
char *    filename,
REPORTTYPE    rep_type
[private]
 

Definition at line 170 of file cost.cc.

References Error(), HTML_REPORT, HTMLCostReport(), OpenOutputFile(), Project::SortTasks(), TEX_REPORT, TeXCostReport(), and TXT_REPORT.

void Reporter::Debug char *    fmt,
...   
[private]
 

Definition at line 137 of file reporter.cc.

Referenced by PrintPeriod(), and TaskGraph().

void Reporter::DoReports Project   project
 

Definition at line 167 of file reporter.cc.

Referenced by main().

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

Definition at line 146 of file reporter.cc.

Referenced by AddNetworkDiagram(), assignY(), CostReport(), findCellInColumn(), maximumX(), NetworkDiagram(), openNetworkDiagram(), OpenOutputFile(), and OpenTaskGraph().

NETWORK_CELL * Reporter::findCellInColumn int    x,
const char *    id
[private]
 

Definition at line 253 of file network.cc.

References Error(), NAMED_ID::id(), NETWORK_CELL::isSpace, NETWORK_CELL::next, and NETWORK_CELL::task.

Referenced by write_chart().

void Reporter::HardSchedule Project   project,
char *    filename
 

Definition at line 472 of file print.cc.

References TASK::finish(), NAMED_ID::id(), TASK::isVacation(), Project::nTasks(), OpenOutputFile(), Project::sDays(), Project::sortedTask(), Project::SortTasks(), and TASK::start().

void Reporter::HTMLCostReport Project   project,
FILE *    f
[private]
 

Definition at line 28 of file cost.cc.

References Project::begin_items(), TASK::begin_items(), Project::beginTaskList(), Project::end_items(), TASK::end_items(), Project::endTaskList(), NAMED_ID::id(), Project::IPLCI, TASK::isVacation(), TASK::itemCost(), NAMED_ID::name(), TASK::numItems(), TASK::timeCost(), and Project::TPLCI.

Referenced by CostReport().

char * Reporter::HTMLFix char *    buf,
const char *    txt
[private]
 

Definition at line 1199 of file print.cc.

Referenced by HTMLReport(), PrintPeriod(), PrintResourcePeriod(), and SlippageReport().

void Reporter::HTMLReport Project   project,
char *    filename
 

Definition at line 1228 of file print.cc.

References TASK::afinish(), TASK::assigned(), TASK::astart(), MILESTONE::bday(), RESOURCE::begin_booked(), TASK::begin_depends(), RESOURCE::begin_notes(), TASK::begin_notes(), Project::beginResourceList(), TASK::bfinish(), TASK::bstart(), BUFLEN, RESOURCE::contains, MILESTONE::day(), TASK::desc(), RESOURCE::end_booked(), TASK::end_depends(), RESOURCE::end_notes(), TASK::end_notes(), Project::endResourceList(), TASK::finish(), HTMLFix(), NAMED_ID::id(), INVALIDDAYNO, RESOURCE::is_group, TASK::isVacation(), NAMED_ID::name(), Project::nMilestones(), NOTE_ITERATOR, Project::nTasks(), OpenOutputFile(), TASK::overrun(), Project::ResourceIsUsedForTask(), ResourceTimeBlockIterator, Project::RPLCI, Project::sDays(), Project::sFinishDay(), Project::sortedMilestone(), Project::sortedTask(), Project::SortMilestones(), Project::SortTasks(), Project::sStartDay(), TASK::start(), Project::TPLCI, and UserTaskWorkedDays().

int Reporter::IsMonth Project   project,
int    dayNo,
char *    name
[private]
 

Definition at line 1171 of file print.cc.

References longMonthNames, Month(), Project::tDays(), and Year().

Referenced by MonthlyReport().

int Reporter::IsWeek Project   project,
int    dayNo,
char *    name
[private]
 

Definition at line 1145 of file print.cc.

References Project::sDays(), Project::tDays(), and Wday().

Referenced by WeeklyReport().

int Reporter::MapX Project   project,
int    dayNo,
int    start,
int    finish
[private]
 

Definition at line 46 of file graph.cc.

References Project::nDays(), and Offset().

Referenced by TaskGraph().

int Reporter::maximumX Project   project [private]
 

Definition at line 83 of file network.cc.

References Project::beginTaskList(), Project::endTaskList(), Error(), and Project::TPLCI.

Referenced by assignY().

int Reporter::Mday time_t    t [private]
 

Definition at line 130 of file print.cc.

Referenced by TaskGraph().

int Reporter::Month time_t    t [private]
 

Definition at line 114 of file print.cc.

Referenced by IsMonth(), and TaskGraph().

void Reporter::MonthlyReport Project   project,
char *    filename,
REPORTTYPE    rep_type
 

Definition at line 1192 of file print.cc.

References IsMonth(), and PeriodicReport().

void Reporter::NetworkDiagram Project   project,
int    start,
int    finish,
const char *    filename
[private]
 

Definition at line 615 of file network.cc.

References assignX(), assignY(), Project::beginTaskList(), canAssignX(), constructStartFinish(), Project::endTaskList(), Error(), Project::TPLCI, and write_chart().

int Reporter::Offset int    x,
int    x1,
int    x2
[private]
 

Definition at line 41 of file graph.cc.

References Bound().

Referenced by MapX(), and TaskGraph().

FILE * Reporter::openNetworkDiagram Project   project,
const char *    filename,
int    llx,
int    lly,
int    urx,
int    ury
[private]
 

Definition at line 194 of file network.cc.

References Error().

Referenced by write_chart().

FILE * Reporter::OpenOutputFile char *    filename [private]
 

Definition at line 34 of file print.cc.

References Error().

Referenced by CostReport(), HardSchedule(), HTMLReport(), PeriodicReport(), SlippageReport(), TexReport(), TextReport(), UtilGraph(), and XMLReport().

FILE * Reporter::OpenTaskGraph const char *    filename,
int    x1,
int    y1,
int    x2,
int    y2
[private]
 

Definition at line 59 of file graph.cc.

References Error().

Referenced by TaskGraph().

void Reporter::PeriodicReport Project   project,
Pperfunc    IsPeriod,
char *    filename,
REPORTTYPE    rep_type
[private]
 

Definition at line 1083 of file print.cc.

References BUFLEN, MESSENGER::getGlobalDebug(), HTML_REPORT, MAX_TIME, OpenOutputFile(), PrintPeriod(), Project::SortTasks(), TEX_REPORT, and TXT_REPORT.

Referenced by MonthlyReport(), and WeeklyReport().

void Reporter::PrintPeriod Project   project,
FILE *    f,
int    dayNo,
int    lastDay,
char *    weekName,
REPORTTYPE    rep_type
[private]
 

Definition at line 937 of file print.cc.

References RESOURCE::begin_booked(), Project::beginResourceList(), Project::beginTaskList(), BUFLEN, Debug(), RESOURCE::end_booked(), Project::endResourceList(), Project::endTaskList(), HTML_REPORT, HTMLFix(), RESOURCE::is_group, NAMED_ID::name(), PrintResourcePeriod(), ResourceTimeBlockIterator, Project::RPLCI, TEX_REPORT, TeXFix(), Project::TPLCI, and TXT_REPORT.

Referenced by PeriodicReport().

void Reporter::PrintResourcePeriod Project   project,
FILE *    f,
RESOURCE   r,
int    dayNo,
int    lastDay,
REPORTTYPE    rep_type
 

Definition at line 821 of file print.cc.

References TASK::assigned(), RESOURCE::begin_booked(), RESOURCE::belongs_to, BUFLEN, RESOURCE::end_booked(), MESSENGER::getGlobalDebug(), HTML_REPORT, HTMLFix(), NAMED_ID::id(), RESOURCE::is_group, TASK::isVacation(), NAMED_ID::name(), ResourceTimeBlockIterator, Project::RPLCI, Project::sDays(), TEX_REPORT, TeXFix(), TXT_REPORT, and UserTaskWorkedDays().

Referenced by PrintPeriod().

void Reporter::SlippageReport Project   project
 

Definition at line 27 of file slippage.cc.

References Project::beginTaskList(), Project::endTaskList(), TASK::fullduration(), HTMLFix(), NAMED_ID::id(), NAMED_ID::name(), TASK::nDays(), OpenOutputFile(), TASK::origfullduration(), TASK::percent_complete(), TeXFix(), and Project::TPLCI.

void Reporter::TaskGraph Project   project,
int    start,
int    finish,
const char *    filename
[private]
 

Display a TaskGraph

Parameters:
project  Project to display
start  first day of the graph
finish  last day of the graph
filename  Name of the file to be ceated/overwrited.

Definition at line 234 of file graph.cc.

References TASK::assigned(), TASK::begin_when(), TASK::DayBooked(), Project::dayNames, Debug(), TASK::end_when(), TASK::finish(), TASK::fullduration(), NAMED_ID::id(), TASK::isVacation(), MapX(), MAX, Mday(), MIN, Month(), monthNames, NAMED_ID::name(), Project::nDays(), Project::nTasks(), Offset(), OpenTaskGraph(), TASK::overlap(), TASK::percent_complete(), Project::sDays(), Project::sortedTask(), Project::SortTasks(), TASK::start(), TaskTimeBlockIterator, Project::tDays(), Wday(), TimeBlock::WORK_DONE, TASK::x1, TASK::x2, TASK::y1, and TASK::y2.

void Reporter::TeXCostReport Project   project,
FILE *    f
[private]
 

Definition at line 104 of file cost.cc.

References Project::begin_items(), TASK::begin_items(), Project::beginTaskList(), Project::end_items(), TASK::end_items(), Project::endTaskList(), NAMED_ID::id(), Project::IPLCI, TASK::isVacation(), TASK::itemCost(), NAMED_ID::name(), Project::numItems(), TASK::numItems(), TASK::timeCost(), and Project::TPLCI.

Referenced by CostReport().

char * Reporter::TeXFix char *    buf,
const char *    txt
[private]
 

Definition at line 496 of file print.cc.

Referenced by PrintPeriod(), PrintResourcePeriod(), SlippageReport(), and TexReport().

void Reporter::TexReport Project   project,
char *    filename
 

Definition at line 528 of file print.cc.

References TASK::afinish(), TASK::assigned(), TASK::astart(), MILESTONE::bday(), RESOURCE::begin_booked(), TASK::begin_depends(), RESOURCE::begin_notes(), TASK::begin_notes(), Project::beginResourceList(), TASK::bfinish(), TASK::bstart(), BUFLEN, RESOURCE::contains, MILESTONE::day(), TASK::desc(), RESOURCE::end_booked(), TASK::end_depends(), RESOURCE::end_notes(), TASK::end_notes(), Project::endResourceList(), TASK::finish(), NAMED_ID::id(), INVALIDDAYNO, RESOURCE::is_group, TASK::isVacation(), NAMED_ID::name(), Project::nMilestones(), NOTE_ITERATOR, Project::nTasks(), OpenOutputFile(), TASK::overrun(), Project::ResourceIsUsedForTask(), ResourceTimeBlockIterator, Project::RPLCI, Project::sDays(), Project::sFinishDay(), Project::sortedMilestone(), Project::sortedTask(), Project::SortMilestones(), Project::SortTasks(), Project::sStartDay(), TASK::start(), TeXFix(), and UserTaskWorkedDays().

void Reporter::TextReport Project   project,
char *    filename
 

Definition at line 164 of file print.cc.

References TASK::afinish(), TASK::assigned(), TASK::astart(), MILESTONE::bday(), TASK::begin_depends(), Project::beginResourceList(), TASK::bfinish(), TASK::bstart(), RESOURCE::contains, MILESTONE::day(), TASK::end_depends(), Project::endResourceList(), TASK::finish(), NAMED_ID::id(), INVALIDDAYNO, RESOURCE::is_group, TASK::isVacation(), NAMED_ID::name(), Project::nMilestones(), Project::nTasks(), OpenOutputFile(), Project::ResourceIsUsedForTask(), Project::RPLCI, Project::sDays(), Project::sFinishDay(), Project::sortedMilestone(), Project::sortedTask(), Project::SortMilestones(), Project::SortTasks(), Project::sStartDay(), and TASK::start().

void Reporter::UtilGraph Project   project,
char *    filename
 

Definition at line 477 of file graph.cc.

References Project::beginResourceList(), Project::endResourceList(), NAMED_ID::id(), RESOURCE::IsUsed(), MAX, MAX_TIME, MIN, OpenOutputFile(), Project::RPLCI, and Project::SortTasks().

Reporter::VARIABLE int   ,
tg_left   ,
(int   )(72 *3.5)
 

void Reporter::Warning char *    fmt,
...   
[private]
 

Definition at line 158 of file reporter.cc.

int Reporter::Wday time_t    t [private]
 

Definition at line 138 of file print.cc.

Referenced by IsWeek(), and TaskGraph().

void Reporter::WeeklyReport Project   project,
char *    filename,
REPORTTYPE    rep_type
 

Definition at line 1165 of file print.cc.

References IsWeek(), and PeriodicReport().

void Reporter::write_chart Project   project,
int    start,
int    finish,
const char *    filename
[private]
 

Definition at line 302 of file network.cc.

References TASK::assigned(), TASK::begin_depends(), TASK::begin_follows(), TASK::end_depends(), TASK::end_follows(), findCellInColumn(), TASK::finish(), TASK::fullduration(), NAMED_ID::id(), NETWORK_CELL::isSpace, TASK::lfinish(), TASK::lstart(), mFinishTask, mStartTask, NAMED_ID::name(), NETWORK_CELL::next, numX, numY, TASK::nx, TASK::ny, openNetworkDiagram(), Project::sDays(), Project::sFinishDay(), TASK::slack(), Project::sStartDay(), TASK::start(), NETWORK_CELL::task, and write_milestones().

Referenced by NetworkDiagram().

void Reporter::write_milestones Project   project,
FILE *    fp,
int    ax,
int    bx,
int    ay,
int    by
[private]
 

Definition at line 270 of file network.cc.

References Project::beginMilestoneList(), MILESTONE::critical(), Project::endMilestoneList(), NAMED_ID::id(), Project::MPLCI, NAMED_ID::name(), TASK::nx, and TASK::ny.

Referenced by write_chart().

void Reporter::XMLReport Project   project,
char *    filename
 

Definition at line 329 of file print.cc.

References TASK::afinish(), TASK::assigned(), TASK::astart(), MILESTONE::bday(), TASK::begin_depends(), TASK::begin_items(), Project::begin_items(), RESOURCE::begin_notes(), TASK::begin_notes(), Project::beginResourceList(), TASK::bfinish(), TASK::bstart(), RESOURCE::contains, MILESTONE::day(), RESOURCE::efficiency(), TASK::end_depends(), TASK::end_items(), Project::end_items(), RESOURCE::end_notes(), TASK::end_notes(), Project::endResourceList(), TASK::finish(), NAMED_ID::id(), INVALIDDAYNO, Project::IPLCI, RESOURCE::is_group, TASK::isVacation(), TASK::itemCost(), NAMED_ID::name(), Project::nMilestones(), NOTE_ITERATOR, Project::nTasks(), OpenOutputFile(), TASK::percent_complete(), RESOURCE::rate(), Project::ResourceIsUsedForTask(), Project::RPLCI, Project::sDays(), Project::sFinishDay(), Project::sortedMilestone(), Project::sortedTask(), Project::SortMilestones(), Project::SortTasks(), Project::sStartDay(), TASK::start(), and TASK::timeCost().

int Reporter::Year time_t    t [private]
 

Definition at line 122 of file print.cc.

Referenced by IsMonth().


Member Data Documentation

TASK* Reporter::mFinishTask [private]
 

Definition at line 210 of file reporter.h.

Referenced by constructStartFinish(), and write_chart().

char* Reporter::monthNames[13] [private]
 

Definition at line 216 of file reporter.h.

Referenced by TaskGraph().

TASK* Reporter::mStartTask [private]
 

Definition at line 209 of file reporter.h.

Referenced by constructStartFinish(), and write_chart().

vector<TASKGRAPH *> Reporter::mTaskGraphs [private]
 

Definition at line 220 of file reporter.h.

Referenced by AddTaskGraph().

vector<TASKNET *> Reporter::mTaskNets [private]
 

Definition at line 221 of file reporter.h.

Referenced by AddNetworkDiagram().


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