diff options
Diffstat (limited to 'kplato/kpttask.cc')
-rw-r--r-- | kplato/kpttask.cc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kplato/kpttask.cc b/kplato/kpttask.cc index c8ecba3a0..964b8e4ea 100644 --- a/kplato/kpttask.cc +++ b/kplato/kpttask.cc @@ -35,7 +35,7 @@ namespace KPlato { -Task::Task(Node *tqparent) : Node(tqparent), m_resource() { +Task::Task(Node *parent) : Node(parent), m_resource() { //kdDebug()<<k_funcinfo<<"("<<this<<")"<<endl; m_resource.setAutoDelete(true); Duration d(1, 0, 0); @@ -52,8 +52,8 @@ Task::Task(Node *tqparent) : Node(tqparent), m_resource() { m_childProxyRelations.setAutoDelete(true); } -Task::Task(Task &task, Node *tqparent) - : Node(task, tqparent), +Task::Task(Task &task, Node *parent) + : Node(task, parent), m_resource() { //kdDebug()<<k_funcinfo<<"("<<this<<")"<<endl; m_resource.setAutoDelete(true); @@ -596,15 +596,15 @@ DateTime Task::calculatePredeccessors(const TQPtrList<Relation> &list, int use) DateTime time; TQPtrListIterator<Relation> it = list; for (; it.current(); ++it) { - if (it.current()->tqparent()->type() == Type_Summarytask) { - //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->tqparent()->name()<<endl; + if (it.current()->parent()->type() == Type_Summarytask) { + //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->parent()->name()<<endl; continue; // skip summarytasks } - DateTime t = it.current()->tqparent()->calculateForward(use); // early finish + DateTime t = it.current()->parent()->calculateForward(use); // early finish switch (it.current()->type()) { case Relation::StartStart: // I can't start earlier than my predesseccor - t = it.current()->tqparent()->getEarliestStart() + it.current()->lag(); + t = it.current()->parent()->getEarliestStart() + it.current()->lag(); break; case Relation::FinishFinish: // I can't finish earlier than my predeccessor, so @@ -723,7 +723,7 @@ DateTime Task::calculateSuccessors(const TQPtrList<Relation> &list, int use) { TQPtrListIterator<Relation> it = list; for (; it.current(); ++it) { if (it.current()->child()->type() == Type_Summarytask) { - //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->tqparent()->name()<<endl; + //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->parent()->name()<<endl; continue; // skip summarytasks } DateTime t = it.current()->child()->calculateBackward(use); @@ -848,17 +848,17 @@ DateTime Task::schedulePredeccessors(const TQPtrList<Relation> &list, int use) { DateTime time; TQPtrListIterator<Relation> it = list; for (; it.current(); ++it) { - if (it.current()->tqparent()->type() == Type_Summarytask) { - //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->tqparent()->name()<<endl; + if (it.current()->parent()->type() == Type_Summarytask) { + //kdDebug()<<k_funcinfo<<"Skip summarytask: "<<it.current()->parent()->name()<<endl; continue; // skip summarytasks } // schedule the predecessors - DateTime earliest = it.current()->tqparent()->getEarliestStart(); - DateTime t = it.current()->tqparent()->scheduleForward(earliest, use); + DateTime earliest = it.current()->parent()->getEarliestStart(); + DateTime t = it.current()->parent()->scheduleForward(earliest, use); switch (it.current()->type()) { case Relation::StartStart: // I can't start before my predesseccor - t = it.current()->tqparent()->startTime() + it.current()->lag(); + t = it.current()->parent()->startTime() + it.current()->lag(); break; case Relation::FinishFinish: // I can't end before my predecessor, so @@ -1301,13 +1301,13 @@ void Task::addParentProxyRelations(TQPtrList<Relation> &list) { nodes.current()->addParentProxyRelations(dependParentNodes()); } } else { - // add 'this' as child relation to the relations tqparent + // add 'this' as child relation to the relations parent //kdDebug()<<k_funcinfo<<m_name<<" is not summary task"<<endl; TQPtrListIterator<Relation> it = list; for (; it.current(); ++it) { - it.current()->tqparent()->addChildProxyRelation(this, it.current()); - // add a tqparent relation to myself - addParentProxyRelation(it.current()->tqparent(), it.current()); + it.current()->parent()->addChildProxyRelation(this, it.current()); + // add a parent relation to myself + addParentProxyRelation(it.current()->parent(), it.current()); } } } @@ -1323,7 +1323,7 @@ void Task::addChildProxyRelations(TQPtrList<Relation> &list) { nodes.current()->addChildProxyRelations(dependChildNodes()); } } else { - // add 'this' as tqparent relation to the relations child + // add 'this' as parent relation to the relations child //kdDebug()<<k_funcinfo<<m_name<<" is not summary task"<<endl; TQPtrListIterator<Relation> it = list; for (; it.current(); ++it) { @@ -1337,13 +1337,13 @@ void Task::addChildProxyRelations(TQPtrList<Relation> &list) { void Task::addParentProxyRelation(Node *node, const Relation *rel) { if (node->type() != Type_Summarytask) { if (type() == Type_Summarytask) { - //kdDebug()<<"Add tqparent proxy from my tqchildren "<<m_name<<" to "<<node->name()<<endl; + //kdDebug()<<"Add parent proxy from my tqchildren "<<m_name<<" to "<<node->name()<<endl; TQPtrListIterator<Node> nodes = m_nodes; for (; nodes.current(); ++nodes) { nodes.current()->addParentProxyRelation(node, rel); } } else { - //kdDebug()<<"Add tqparent proxy from "<<node->name()<<" to (me) "<<m_name<<endl; + //kdDebug()<<"Add parent proxy from "<<node->name()<<" to (me) "<<m_name<<endl; m_parentProxyRelations.append(new ProxyRelation(node, this, rel->type(), rel->lag())); } } @@ -1497,13 +1497,13 @@ bool Task::calcCriticalPath(bool fromEnd) { } TQPtrListIterator<Relation> it(m_parentProxyRelations); for (; it.current(); ++it) { - if (it.current()->tqparent()->calcCriticalPath(fromEnd)) { + if (it.current()->parent()->calcCriticalPath(fromEnd)) { m_currentSchedule->inCriticalPath = true; } } TQPtrListIterator<Relation> pit(m_dependParentNodes); for (; pit.current(); ++pit) { - if (pit.current()->tqparent()->calcCriticalPath(fromEnd)) { + if (pit.current()->parent()->calcCriticalPath(fromEnd)) { m_currentSchedule->inCriticalPath = true; } } |