kplato
KPlato::Relation Class Reference
#include <kptrelation.h>
Inherited by KPlato::ProxyRelation.
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 | |
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 Duration & | lag () const |
void | setLag (Duration lag) |
Node * | parent () const |
Node * | child () const |
bool | load (QDomElement &element, Project &project) |
void | save (QDomElement &element) const |
void | printDebug (QCString indent) |
Protected Attributes | |
Node * | m_parent |
Node * | m_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
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] |
Node* KPlato::Relation::child | ( | ) | const [inline] |
The documentation for this class was generated from the following files: