## MrpRelation

MrpRelation — represents a task predecessor relation in the project.

## Functions

MrpTask * | mrp_relation_get_predecessor ()
MrpTask * | mrp_relation_get_successor ()
gint | mrp_relation_get_lag ()
MrpRelationType | mrp_relation_get_relation_type ()

## Properties

int | lag | Read / Write
MrpTask * | predecessor | Read / Write / Construct Only
MrpTask * | successor | Read / Write / Construct Only
MrpRelationType | type | Read / Write

## Signals

void | changed | Run Last

## Types and Values

#define | MRP_TYPE_RELATION
| MrpRelation

## Object Hierarchy

        GObject
        ╰── MrpObject
            ╰── MrpRelation

## Includes

    #include <libplanner/mrp-relation.h>

## Description

A predecessor relation is used to affect the scheduling of a task relative another task. A relation may have a lag time associated to it, so that a task can be scheduled to start after another task has finished, plus a lag time.

## Functions

### mrp_relation_get_predecessor ()

    MrpTask *
    mrp_relation_get_predecessor (MrpRelation *relation);

Retrieves the predecessor of `relation` .

#### Parameters

relation | an MrpRelation |

#### Returns

the predecessor task.

### mrp_relation_get_successor ()

    MrpTask *
    mrp_relation_get_successor (MrpRelation *relation);

Retrieves the successor of `relation` .

#### Parameters

relation | an MrpRelation |

#### Returns

the successor task.

### mrp_relation_get_lag ()

    gint
    mrp_relation_get_lag (MrpRelation *relation);

Retrieves the lag between the predecessor and successor in `relation` .

#### Parameters

relation | an MrpRelation |

#### Returns

Lag time in seconds.

### mrp_relation_get_relation_type ()

    MrpRelationType
    mrp_relation_get_relation_type (MrpRelation *relation);

Retrieves the relation type of `relation` .

#### Parameters

relation | an MrpRelation |

#### Returns

the MrpRelationType of the relation.

## Types and Values

### MRP_TYPE_RELATION

    #define             MRP_TYPE_RELATION

### MrpRelation

    typedef struct _MrpRelation MrpRelation;

Object representing a predecessor relation between two tasks.

## Property Details

### The `“lag”` property

      “lag”                      int

Lag between the predecessor and successor.

Owner: MrpRelation

Flags: Read / Write

Allowed values: >= -2147483647

Default value: 0

### The `“predecessor”` property

      “predecessor”              MrpTask *

The predecessor in the relation.

Owner: MrpRelation

Flags: Read / Write / Construct Only

### The `“successor”` property

      “successor”                MrpTask *

The successor in the relation.

Owner: MrpRelation

Flags: Read / Write / Construct Only

### The `“type”` property

      “type”                     MrpRelationType

The type of relation.

Owner: MrpRelation

Flags: Read / Write

Default value: MRP_RELATION_FS

## Signal Details

### The `“changed”` signal

    void
    user_function (MrpRelation *relation,
                   gpointer     user_data)

emitted when `relation` changes.

#### Parameters

relation | an MrpRelation. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last