#include <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 (TQDomElement &element, Project &project) |
| void | save (TQDomElement &element) const |
| void | printDebug (TQCString indent) |
Protected Attributes | |
| Node * | m_parent |
| Node * | m_child |
| Type | m_type |
| Duration | m_lag |
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.
Member Enumeration Documentation
◆ Result
| enum KPlato::Relation::Result |
Definition at line 78 of file kptrelation.h.
◆ Type
| enum KPlato::Relation::Type |
Definition at line 47 of file kptrelation.h.
Constructor & Destructor Documentation
◆ Relation() [1/3]
Definition at line 34 of file kptrelation.cpp.
◆ Relation() [2/3]
Definition at line 41 of file kptrelation.cpp.
◆ Relation() [3/3]
| KPlato::Relation::Relation | ( | Relation * | rel | ) |
Definition at line 48 of file kptrelation.cpp.
◆ ~Relation()
|
virtual |
When deleted the relation will remove itself from the parent- and child nodes lists.
Definition at line 55 of file kptrelation.cpp.
Member Function Documentation
◆ child()
|
inline |
- Returns
- The child dependent node.
Definition at line 76 of file kptrelation.h.
◆ lag()
|
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.
◆ load()
| bool KPlato::Relation::load | ( | TQDomElement & | element, |
| Project & | project ) |
Definition at line 68 of file kptrelation.cpp.
◆ parent()
|
inline |
- Returns
- The parent dependent node.
Definition at line 72 of file kptrelation.h.
◆ printDebug()
| void KPlato::Relation::printDebug | ( | TQCString | indent | ) |
Definition at line 134 of file kptrelation.cpp.
◆ save()
| void KPlato::Relation::save | ( | TQDomElement & | element | ) | const |
Definition at line 111 of file kptrelation.cpp.
◆ setLag()
|
inline |
Definition at line 67 of file kptrelation.h.
◆ setType()
| void KPlato::Relation::setType | ( | Type | type | ) |
Definition at line 63 of file kptrelation.cpp.
◆ type()
|
inline |
Definition at line 60 of file kptrelation.h.
Member Data Documentation
◆ m_child
|
protected |
Definition at line 89 of file kptrelation.h.
◆ m_lag
|
protected |
Definition at line 91 of file kptrelation.h.
◆ m_parent
|
protected |
Definition at line 88 of file kptrelation.h.
◆ m_type
|
protected |
Definition at line 90 of file kptrelation.h.
The documentation for this class was generated from the following files:
