MrpAssignment

MrpAssignment

Functions

Properties

MrpResource * resource Read / Write
MrpTask * task Read / Write
gint units Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── MrpObject
        ╰── MrpAssignment

Includes

#include <libplanner/planner.h>

Description

Functions

mrp_assignment_new ()

MrpAssignment *
mrp_assignment_new (void);

Creates a new, empty, assignment. You most often don't want to create an assignment explicitly like this, but using mrp_resource_assign() instead.

Returns

Newly created assignment.


mrp_assignment_get_task ()

MrpTask *
mrp_assignment_get_task (MrpAssignment *assignment);

Retrieves the MrpTask associated with assignment .

Parameters

assignment

an MrpAssignment

 

Returns

the task associated with the assignment object. The reference count of the task is not increased.


mrp_assignment_get_resource ()

MrpResource *
mrp_assignment_get_resource (MrpAssignment *assignment);

Retrieves the MrpResource associated with assignment .

Parameters

assignment

an MrpAssignment

 

Returns

the resource associated with the assignment object. The reference count of the resource is not increased.


mrp_assignment_get_units ()

gint
mrp_assignment_get_units (MrpAssignment *assignment);

Retrieves the number of units that the resource is assigned with to the task. 100 means 100%, etc.

Parameters

assignment

an MrpAssignment

 

Returns

number of units of the assignment.

Types and Values

MrpAssignmentPriv

typedef struct _MrpAssignmentPriv MrpAssignmentPriv;

MrpAssignment

typedef struct _MrpAssignment MrpAssignment;

Property Details

The “resource” property

  “resource”                 MrpResource *

The resource that is assigned to the task.

Flags: Read / Write


The “task” property

  “task”                     MrpTask *

The task.

Flags: Read / Write


The “units” property

  “units”                    gint

Number of units assignment.

Flags: Read / Write

Allowed values: >= -1

Default value: 0