kplato

KPlato::Relation Class Reference

#include <kptrelation.h>

Inheritance diagram for KPlato::Relation:

KPlato::ProxyRelation List of all members.

Detailed Description

The relation class couples a 2 nodes together which are dependent on each other.

If for example you have a project to build a house, the node that represents the adding of the roof is dependent on the node that represents the building of the walls. The roof can't be put up if the walls are not there yet. We actually have a number of relationtypes so this relation can be used in different manners.

Definition at line 45 of file kptrelation.h.


Public Types

 FinishStart
 FinishFinish
 StartStart
 SUCCESS = 0l
 HASCHILDREN = 1l
 NOTIMPL = 2l
enum  Type { FinishStart, FinishFinish, StartStart }
enum  Result { SUCCESS = 0l, HASCHILDREN = 1l, NOTIMPL = 2l }

Public Member Functions

 Relation (Node *parent, Node *child, Type type, Duration lag)
 Relation (Node *parent=0, Node *child=0, Type type=FinishStart)
 Relation (Relation *rel)
virtual ~Relation ()
void setType (Type)
Type type () const
const Durationlag () const
void setLag (Duration lag)
Nodeparent () const
Nodechild () const
bool load (QDomElement &element, Project &project)
void save (QDomElement &element) const
void printDebug (QCString indent)

Protected Attributes

Nodem_parent
Nodem_child
Type m_type
Duration m_lag

Constructor & Destructor Documentation

KPlato::Relation::~Relation (  )  [virtual]

When deleted the relation will remove itself from the parent- and child nodes lists.

Definition at line 55 of file kptrelation.cc.


Member Function Documentation

Node* KPlato::Relation::child (  )  const [inline]

Returns:
The child dependent node.

Definition at line 76 of file kptrelation.h.

const Duration& KPlato::Relation::lag (  )  const [inline]

returns the lag.

The lag of a relation is the time it takes between the parent starting/stopping and the start of the child.

Definition at line 66 of file kptrelation.h.

Node* KPlato::Relation::parent (  )  const [inline]

Returns:
The parent dependent node.

Definition at line 72 of file kptrelation.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys