kplato
KPlato::Node Class Reference
#include <kptnode.h>
Inheritance diagram for KPlato::Node:

Detailed Description
This class represents any node in the project, a node can be a project or a subproject or any task.This class is basically an abstract interface to make the design more OO.
Definition at line 57 of file kptnode.h.
Public Types | |
enum | ConstraintType { ASAP, ALAP, MustStartOn, MustFinishOn, StartNotEarlier, FinishNotLater, FixedInterval } |
enum | NodeTypes { Type_Node = 0, Type_Project = 1, Type_Subproject = 2, Type_Task = 3, Type_Milestone = 4, Type_Periodic = 5, Type_Summarytask = 6 } |
Public Member Functions | |
Node (Node *parent=0) | |
Node (Node &node, Node *parent=0) | |
virtual | ~Node ()=0 |
bool | setId (QString id) |
QString | id () const |
virtual int | type () const =0 |
virtual Node * | projectNode () |
virtual bool | load (QDomElement &) |
virtual bool | load (QDomElement &, Project &) |
virtual void | save (QDomElement &element) const =0 |
virtual void | saveRelations (QDomElement &element) const |
Node * | getParent () const |
void | setParent (Node *newParent) |
const QPtrList< Node > & | childNodeIterator () const |
int | numChildren () const |
virtual void | addChildNode (Node *node, Node *after=0) |
virtual void | insertChildNode (unsigned int index, Node *node) |
void | delChildNode (Node *node, bool remove=true) |
void | delChildNode (int number, bool remove=true) |
Node * | getChildNode (int number) |
const Node * | getChildNode (int number) const |
int | findChildNode (Node *node) |
int | numDependChildNodes () const |
virtual void | addDependChildNode (Node *node, Relation::Type p=Relation::FinishStart) |
virtual void | addDependChildNode (Node *node, Relation::Type p, Duration lag) |
virtual bool | addDependChildNode (Relation *relation) |
virtual void | insertDependChildNode (unsigned int index, Node *node, Relation::Type p=Relation::FinishStart) |
void | delDependChildNode (Node *node, bool remove=false) |
void | delDependChildNode (Relation *rel, bool remove=false) |
void | delDependChildNode (int number, bool remove=false) |
Relation * | getDependChildNode (int number) |
QPtrList< Relation > & | dependChildNodes () |
void | takeDependChildNode (Relation *rel) |
int | numDependParentNodes () const |
virtual void | addDependParentNode (Node *node, Relation::Type p=Relation::FinishStart) |
virtual void | addDependParentNode (Node *node, Relation::Type p, Duration lag) |
virtual bool | addDependParentNode (Relation *relation) |
virtual void | insertDependParentNode (unsigned int index, Node *node, Relation::Type p=Relation::FinishStart) |
void | delDependParentNode (Node *node, bool remove=false) |
void | delDependParentNode (Relation *rel, bool remove=false) |
void | delDependParentNode (int number, bool remove=false) |
Relation * | getDependParentNode (int number) |
QPtrList< Relation > & | dependParentNodes () |
void | takeDependParentNode (Relation *rel) |
bool | isParentOf (Node *node) |
bool | isDependChildOf (Node *node) |
Relation * | findParentRelation (Node *node) |
Relation * | findChildRelation (Node *node) |
Relation * | findRelation (Node *node) |
void | setStartTime (DateTime startTime) |
virtual DateTime | startTime () const |
const QDate & | startDate () const |
void | setEndTime (DateTime endTime) |
virtual DateTime | endTime () const |
const QDate & | endDate () const |
void | setEffort (Effort *e) |
Effort * | effort () const |
virtual Duration * | getExpectedDuration ()=0 |
virtual Duration * | getRandomDuration ()=0 |
Duration * | getDelay () |
DateTime | getEarliestStart () const |
void | setEarliestStart (const DateTime &dt) |
DateTime | getLatestFinish () const |
void | setLatestFinish (const DateTime &dt) |
QString & | name () |
QString & | leader () |
QString & | description () |
const QString & | name () const |
const QString & | leader () const |
const QString & | description () const |
void | setName (const QString &n) |
void | setLeader (const QString &l) |
void | setDescription (const QString &d) |
virtual void | setConstraint (Node::ConstraintType type) |
void | setConstraint (QString &type) |
int | constraint () const |
QString | constraintToString () const |
virtual void | setConstraintStartTime (QDateTime time) |
virtual void | setConstraintEndTime (QDateTime time) |
virtual DateTime | constraintStartTime () const |
virtual DateTime | constraintEndTime () const |
virtual DateTime | startNotEarlier () const |
virtual DateTime | finishNotLater () const |
virtual DateTime | mustStartOn () const |
virtual DateTime | mustFinishOn () const |
virtual ResourceGroupRequest * | resourceRequest (ResourceGroup *) const |
virtual void | makeAppointments () |
bool | resourceError () const |
virtual bool | resourceOverbooked () const |
virtual void | calcResourceOverbooked () |
bool | resourceNotAvailable () const |
virtual bool | schedulingError () const |
bool | notScheduled () const |
virtual EffortCostMap | plannedEffortCostPrDay (const QDate &start, const QDate &end) const =0 |
virtual Duration | plannedEffort () |
virtual Duration | plannedEffort (const QDate &) |
virtual Duration | plannedEffortTo (const QDate &) |
virtual Duration | actualEffort () |
virtual Duration | actualEffort (const QDate &) |
virtual Duration | actualEffortTo (const QDate &) |
virtual double | plannedCost () |
virtual double | plannedCost (const QDate &) |
virtual double | plannedCostTo (const QDate &) |
virtual double | actualCost () |
virtual double | actualCost (const QDate &) |
virtual double | actualCostTo (const QDate &) |
double | effortPerformanceIndex (const QDate &, bool *) |
double | costPerformanceIndex (const QDate &, bool *) |
virtual void | initiateCalculationLists (QPtrList< Node > &startnodes, QPtrList< Node > &endnodes, QPtrList< Node > &summarytasks)=0 |
virtual DateTime | calculateForward (int)=0 |
virtual DateTime | calculateBackward (int)=0 |
virtual DateTime | scheduleForward (const DateTime &, int)=0 |
virtual DateTime | scheduleBackward (const DateTime &, int)=0 |
virtual void | adjustSummarytask ()=0 |
virtual void | initiateCalculation (Schedule &sch) |
virtual void | resetVisited () |
void | propagateEarliestStart (DateTime &time) |
void | propagateLatestFinish (DateTime &time) |
void | moveEarliestStart (DateTime &time) |
void | moveLatestFinish (DateTime &time) |
virtual Duration | summarytaskDurationForward (const DateTime &) |
virtual DateTime | summarytaskEarliestStart () |
virtual Duration | summarytaskDurationBackward (const DateTime &) |
virtual DateTime | summarytaskLatestFinish () |
const Duration & | duration () |
Duration | duration (const DateTime &time, int use, bool backward) |
virtual Duration | calcDuration (const DateTime &, const Duration &, bool) |
Node * | siblingBefore () |
Node * | childBefore (Node *node) |
Node * | siblingAfter () |
Node * | childAfter (Node *node) |
bool | moveChildUp (Node *node) |
bool | moveChildDown (Node *node) |
bool | legalToLink (Node *node) |
virtual bool | legalToLink (Node *, Node *) |
virtual bool | isEndNode () const |
virtual bool | isStartNode () const |
virtual void | clearProxyRelations () |
virtual void | addParentProxyRelations (QPtrList< Relation > &) |
virtual void | addChildProxyRelations (QPtrList< Relation > &) |
virtual void | addParentProxyRelation (Node *, const Relation *) |
virtual void | addChildProxyRelation (Node *, const Relation *) |
virtual void | saveAppointments (QDomElement &element, long id) const |
QPtrList< Appointment > | appointments () |
virtual bool | addAppointment (Appointment *appointment) |
virtual bool | addAppointment (Appointment *appointment, Schedule &main) |
virtual void | addAppointment (ResourceSchedule *resource, DateTime &start, DateTime &end, double load=100) |
virtual Node * | findNode () const |
virtual Node * | findNode (const QString &id) const |
virtual bool | removeId () |
virtual bool | removeId (const QString &id) |
virtual void | insertId (const QString &id) |
virtual void | insertId (const QString &id, const Node *node) |
virtual DateTime | workStartTime () const |
void | setWorkStartTime (const DateTime &dt) |
virtual DateTime | workEndTime () const |
void | setWorkEndTime (const DateTime &dt) |
virtual bool | isCritical () const |
virtual bool | inCriticalPath () const |
virtual bool | calcCriticalPath (bool fromEnd) |
virtual int | level () |
virtual void | generateWBS (int count, WBSDefinition &def, QString wbs=QString()) |
QString | wbs () const |
double | startupCost () const |
void | setStartupCost (double cost) |
Account * | startupAccount () const |
void | setStartupAccount (Account *acc) |
double | shutdownCost () const |
void | setShutdownCost (double cost) |
Account * | shutdownAccount () const |
void | setShutdownAccount (Account *acc) |
Account * | runningAccount () const |
void | setRunningAccount (Account *acc) |
Schedule * | currentSchedule () const |
virtual void | setCurrentSchedule (long id) |
void | setCurrentSchedulePtr (Schedule *schedule) |
QIntDict< Schedule > & | schedules () |
Schedule * | findSchedule (const QString name, const Schedule::Type type) const |
Schedule * | findSchedule (const Schedule::Type type) const |
Schedule * | findSchedule (long id) const |
void | takeSchedule (const Schedule *schedule) |
void | addSchedule (Schedule *schedule) |
Schedule * | createSchedule (QString name, Schedule::Type type, long id) |
Schedule * | createSchedule (Schedule *parent) |
void | setScheduleDeleted (long id, bool onoff) |
virtual void | setParentSchedule (Schedule *sch) |
DateTime | startTime () |
DateTime | endTime () |
virtual void | printDebug (bool children, QCString indent) |
Protected Attributes | |
QPtrList< Node > | m_nodes |
QPtrList< Relation > | m_dependChildNodes |
QPtrList< Relation > | m_dependParentNodes |
Node * | m_parent |
QString | m_id |
QString | m_name |
QString | m_leader |
QString | m_description |
Effort * | m_effort |
ConstraintType | m_constraint |
DateTime | m_constraintStartTime |
DateTime | m_constraintEndTime |
bool | m_visitedForward |
bool | m_visitedBackward |
Duration | m_durationForward |
Duration | m_durationBackward |
QDate | m_dateOnlyStartDate |
QDate | m_dateOnlyEndDate |
Duration | m_dateOnlyDuration |
QIntDict< Schedule > | m_schedules |
Schedule * | m_currentSchedule |
QString | m_wbs |
double | m_startupCost |
Account * | m_startupAccount |
double | m_shutdownCost |
Account * | m_shutdownAccount |
Account * | m_runningAccount |
Member Function Documentation
|
Actual cost on date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Actual cost is the sum total of the reported costs actually used for this node.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Actual cost up to and including date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the total actual effort for this task (or subtasks) on date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the total actual effort for this task (or subtasks).
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the total actual effort for this task (or subtasks) up to and including date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Adds appointment to both this node and resource.
Definition at line 646 of file kptnode.cc. |
|
Adds appointment to this node only (not to resource).
Definition at line 636 of file kptnode.cc. |
|
Adds appointment to this node only (not to resource).
Definition at line 630 of file kptnode.cc. |
|
Adds relation only to this node.
Definition at line 202 of file kptnode.cc. |
|
Adds relation to both this node and .
Definition at line 186 of file kptnode.cc. |
|
Adds relation to both this node and .
Definition at line 182 of file kptnode.cc. |
|
Adds relation only to this node.
Definition at line 261 of file kptnode.cc. |
|
Adds relation to both this node and node.
Definition at line 245 of file kptnode.cc. |
|
Adds relation to both this node and node.
Definition at line 241 of file kptnode.cc. |
|
Add schedule to list, replace if schedule with same id allready exists.
Definition at line 662 of file kptnode.cc. |
|
Return the list of appointments for current schedule.
Definition at line 618 of file kptnode.cc. |
|
Calculates if the assigned resource is overbooked within the duration of this node.
Reimplemented in KPlato::Task. Definition at line 374 of file kptnode.cc. |
|
Cost performance index.
Reimplemented in KPlato::Task. |
|
Create a new schedule.
Definition at line 675 of file kptnode.cc. |
|
Create a new schedule.
Definition at line 668 of file kptnode.cc. |
|
Calculates and returns the duration of the node. Uses the correct expected-, optimistic- or pessimistic effort dependent on use.
Definition at line 349 of file kptnode.cc. |
|
Effort based performance index.
Reimplemented in KPlato::Task. |
|
Return the scheduled end time.
Reimplemented in KPlato::Project. |
|
Find the node with identity id.
Reimplemented in KPlato::Project. |
|
Find the node with my id.
|
|
Find schedule matching id. Also returns deleted schedule.
|
|
Find schedule matching type. Does not return deleted schedule.
Definition at line 692 of file kptnode.cc. |
|
Find schedule matching name and type. Does not return deleted schedule.
Definition at line 682 of file kptnode.cc. |
|
Generate WBS.
Reimplemented in KPlato::Project. Definition at line 752 of file kptnode.cc. |
|
Calculate the delay of this node. It is the difference between the actual startTime and scheduled startTime. Definition at line 175 of file kptnode.cc. |
|
getEarliestStart() returns earliest time this node can start given the constraints of the network.
|
|
Returns the (previously) calculated duration.
Implemented in KPlato::Project, and KPlato::Task. |
|
getLatestFinish() returns latest time this node can finish
|
|
Instead of using the expected duration, generate a random value using the Distribution of each Task. This can be used for Monte-Carlo estimation of Project duration. Implemented in KPlato::Project, and KPlato::Task. |
|
Inserts relation to this node at index and appends relation to .
Definition at line 194 of file kptnode.cc. |
|
Inserts relation to this node at index and appends relation to node.
Definition at line 253 of file kptnode.cc. |
|
Insert node with identity id into the register.
Reimplemented in KPlato::Project. |
|
Insert myself into the id register.
|
|
Check if this node has any dependent child nodes.
Reimplemented in KPlato::Task. Definition at line 560 of file kptnode.cc. |
|
Check if this node has any dependent parent nodes.
Reimplemented in KPlato::Task. Definition at line 563 of file kptnode.cc. |
|
Check if node par can be linked to node child. (Reimplement).
Reimplemented in KPlato::Project. |
|
Check if this node can be linked to node.
Definition at line 553 of file kptnode.cc. |
|
Returns the level this node is in the hierarchy. Top node is level 0.
Definition at line 747 of file kptnode.cc. |
|
The node has not been scheduled.
|
|
Planned cost on date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Planned cost is the sum total of all resources and other costs planned for this node.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Planned cost from start of activity up to and including date is the sum of all resource costs and other costs planned for this node.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the total planned effort for this task (or subtasks) on date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the total planned effort for this task (or subtasks).
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns the planned effort up to and including date.
Reimplemented in KPlato::Project, and KPlato::Task. |
|
Returns a pointer to the project node (main- or sub-project) Returns 0 if no project exists.
Definition at line 109 of file kptnode.cc. |
|
Remove the registered identity id.
Reimplemented in KPlato::Project. |
|
Remove myself from the id register.
|
|
EffortType == Effort, but no resource is requested.
|
|
The requested resource is not available.
|
|
The assigned resource is overbooked.
|
|
Save appointments for schedule with id.
Reimplemented in KPlato::Task. Definition at line 610 of file kptnode.cc. |
|
Save my and my childrens relations.
Definition at line 381 of file kptnode.cc. |
|
The task cannot be scheduled to fullfill all the constraints.
|
|
Set current schedule to schedule with identity id, for me and my children.
Reimplemented in KPlato::Project, and KPlato::Task. Definition at line 763 of file kptnode.cc. |
|
setEarliestStart() sets earliest time this node can start
|
|
setLatestFinish() sets latest time this node can finish given the constraints of the network.
|
|
Set parent schedule recursivly.
Reimplemented in KPlato::Project. Definition at line 712 of file kptnode.cc. |
|
Set deleted = onoff for schedule with id.
Definition at line 703 of file kptnode.cc. |
|
Return the scheduled start time.
Reimplemented in KPlato::Project. |
|
Takes the relation rel from this node only. Never deletes even when autoDelete = true. Definition at line 235 of file kptnode.cc. |
|
Takes the relation rel from this node only. Never deletes even when autoDelete = true. Definition at line 294 of file kptnode.cc. |
|
Take, don't delete (as in destruct).
Definition at line 654 of file kptnode.cc. |
|
This is when work can finish on this node in accordance with the calendar of allocated resources. Normally this is the same as endTime(), but may differ if timing constraints are set. Reimplemented in KPlato::Task. |
|
This is when work can start on this node in accordance with the calendar of allocated resources. Normally this is the same as startTime(), but may differ if timing constraints are set. Reimplemented in KPlato::Task. |
Member Data Documentation
|
is used if any of the constraints FixedInterval, FinishNotLater, MustFinishOn or FixedInterval is selected
|
|
is used if any of the constraints FixedInterval, StartNotEarlier, MustStartOn or FixedInterval is selected
|
The documentation for this class was generated from the following files: