MrpAssignment

MrpAssignment

Synopsis


#include <libplanner/planner.h>

                    MrpAssignmentPriv;
                    MrpAssignment;
MrpAssignment*      mrp_assignment_new                  (void);
MrpTask*            mrp_assignment_get_task             (MrpAssignment *assignment);
MrpResource*        mrp_assignment_get_resource         (MrpAssignment *assignment);
gint                mrp_assignment_get_units            (MrpAssignment *assignment);

Object Hierarchy

  GObject
   +----MrpObject
         +----MrpAssignment

Properties

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

Description

Details

MrpAssignmentPriv

typedef struct _MrpAssignmentPriv MrpAssignmentPriv;

A private struct for internal use only. The definition of this structure is not publically available.


MrpAssignment

typedef struct _MrpAssignment MrpAssignment;

Represents an assignment, i.e. the assignment of a task to a resource.


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.

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.

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.

assignment :

an MrpAssignment

Returns :

number of units of the assignment.

Property Details

The "resource" property

  "resource"                 MrpResource*          : Read / Write

The resource that is assigned to the task.


The "task" property

  "task"                     MrpTask*              : Read / Write

The task.


The "units" property

  "units"                    gint                  : Read / Write

Number of units assignment.

Allowed values: >= -1

Default value: 0