Top | ![]() |
![]() |
![]() |
![]() |
MrpResource * | mrp_resource_new () |
const gchar * | mrp_resource_get_name () |
void | mrp_resource_set_name () |
const gchar * | mrp_resource_get_short_name () |
void | mrp_resource_set_short_name () |
void | mrp_resource_assign () |
GList * | mrp_resource_get_assignments () |
GList * | mrp_resource_get_assigned_tasks () |
gint | mrp_resource_compare () |
MrpCalendar * | mrp_resource_get_calendar () |
void | mrp_resource_set_calendar () |
A resource has got a name.
Resources come in MrpResourceType: work, material.
A resource has got a cost.
A resource can belong to an MrpGroup. An MrpProject maintains a list of MrpGroup and can designates one as the default. If you specify a default group, every new resource that you add will be placed in this group. Of course, you can still change the group to another as needed.
A resource lists the assignments it is involved in. It knows about its assigned tasks.
A resource can use its own MrpCalendar instead of the project calendar.
Resources are ordered.
Administrative data can be associated: an email, a note.
const gchar *
mrp_resource_get_name (MrpResource *resource
);
Retrieves the name of resource
.
void mrp_resource_set_name (MrpResource *resource
,const gchar *name
);
Sets the name of resource
.
const gchar *
mrp_resource_get_short_name (MrpResource *resource
);
Retrieves the short_name of resource
.
void mrp_resource_set_short_name (MrpResource *resource
,const gchar *short_name
);
Sets the short name of resource
.
void mrp_resource_assign (MrpResource *resource
,MrpTask *task
,gint units
);
Assigns resource
to task
by the given amount of units
. A value of 100
units corresponds to fulltime assignment.
GList *
mrp_resource_get_assignments (MrpResource *resource
);
Retrieves the assignments that this resource has. If caller needs to manipulate the returned list, a copy of it needs to be made.
GList *
mrp_resource_get_assigned_tasks (MrpResource *resource
);
Retrieves a list of all the tasks that this resource is assigned to. It is
basically a convenience wrapper around mrp_resource_get_assignments()
.
gint mrp_resource_compare (gconstpointer a
,gconstpointer b
);
Comparison routine for resources. It is suitable for sorting, and only compares the resource name.
MrpCalendar *
mrp_resource_get_calendar (MrpResource *resource
);
Retrieves the calendar that is used for resource
. If no calendar is set,
NULL
is returned, which means the project default calendar.
void mrp_resource_set_calendar (MrpResource *resource
,MrpCalendar *calendar
);
Sets the calendar to use for resource
. NULL
means to use the project
default calendar.
“calendar”
property“calendar” gpointer
The calendar this resource uses.
Owner: MrpResource
Flags: Read / Write
“cost”
property“cost” gfloat
The standard cost of the resource.
Owner: MrpResource
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“email”
property“email” gchar *
The email address of the resource.
Owner: MrpResource
Flags: Read / Write
Default value: NULL
“group”
property“group” MrpGroup *
The group that the resource belongs to.
Owner: MrpResource
Flags: Read / Write
“name”
property“name” gchar *
The name of the resource.
Owner: MrpResource
Flags: Read / Write
Default value: NULL
“note”
property“note” gchar *
Resource note.
Owner: MrpResource
Flags: Read / Write
Default value: ""
“short-name”
property“short-name” gchar *
The shorter name, initials or nickname of the resource.
Owner: MrpResource
Flags: Read / Write
Default value: NULL
“type”
property“type” gint
The type of resource this is.
Owner: MrpResource
Flags: Read / Write
Allowed values: [0,2]
Default value: 1
“units”
property“units” gint
The amount of units this resource has.
Owner: MrpResource
Flags: Read / Write
Allowed values: >= -1
Default value: 0
“assignment-added”
signalvoid user_function (MrpResource *resource, MrpAssignment *assignment, gpointer user_data)
emitted when assignment
is added.
resource |
the object which received the signal. |
|
assignment |
the added MrpAssignment. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“assignment-removed”
signalvoid user_function (MrpResource *resource, MrpAssignment *assignment, gpointer user_data)
emitted when assignment
is removed.
resource |
the object which received the signal. |
|
assignment |
the removed MrpAssignment. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last