![]() |
![]() |
![]() |
Libplanner Reference Manual | ![]() |
---|---|---|---|---|
#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);
"resource" MrpResource : Read / Write "task" MrpTask : Read / Write "units" gint : Read / Write
typedef struct _MrpAssignmentPriv MrpAssignmentPriv;
A private struct for internal use only. The definition of this structure is not publically available.
typedef struct _MrpAssignment MrpAssignment;
Represents an assignment, i.e. the assignment of a task to a resource.
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. |
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. |
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. |
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. |
resource
" property"resource" MrpResource : Read / Write
The resource that is assigned to the task.
units
" property"units" gint : Read / Write
Number of units assignment.
Allowed values: >= G_MAXULONG
Default value: 0