[planner] Even section blocks.



commit adf577b463f64a3f4ec6a1bcec9c0c9aa92fc733
Author: Ahmed Baïzid <ahmed baizid org>
Date:   Fri Apr 10 10:23:06 2015 +0200

    Even section blocks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747423

 libplanner/mrp-application.c | 20 ++++++++++++++++++--
 libplanner/mrp-assignment.c  |  6 ++++++
 libplanner/mrp-calendar.c    |  1 +
 libplanner/mrp-day.c         |  3 ++-
 libplanner/mrp-error.c       |  9 +++++++++
 libplanner/mrp-group.c       | 12 ++++++++++++
 libplanner/mrp-object.c      | 20 ++++++++++++++++++++
 libplanner/mrp-project.c     | 21 +++++++++++++++++++++
 libplanner/mrp-property.c    |  1 +
 libplanner/mrp-relation.c    |  1 +
 libplanner/mrp-resource.c    | 22 ++++++++++++++++++++++
 libplanner/mrp-task.c        | 32 ++++++++++++++++++++++++++++++++
 libplanner/mrp-time.c        | 15 ++++++++++++++-
 libplanner/mrp-types.c       |  9 +++++++++
 14 files changed, 168 insertions(+), 4 deletions(-)
---
diff --git a/libplanner/mrp-application.c b/libplanner/mrp-application.c
index c8537ac..46499c2 100644
--- a/libplanner/mrp-application.c
+++ b/libplanner/mrp-application.c
@@ -25,6 +25,20 @@
  * SECTION:mrp-application
  * @Short_description: the main project application object.
  * @Title: MrpApplication
+ * @include: libplanner/mrp-application.h
+ *
+ * #MrpApplication is the libplanner infrastructure.
+ * It loads #GModule plug-ins, registers file readers and writers.
+ *
+ * One must instantiate an #MrpApplication to use libplanner.
+ * A sole one can be instantiated.
+ *
+ * #MrpApplication also features a unique identifier generator.
+ * mrp_application_get_unique_id() generates a unique id within the application.
+ *
+ * #MrpApplication is able to register pointers against an id.
+ * mrp_application_id_get_data() retrieves the pointer given the id.
+ * Every #MrpObject registers itself this way.
  */
 
 #include <config.h>
@@ -247,7 +261,7 @@ mrp_application_get_unique_id (void)
        return ++last_used_id;
 }
 
-/**
+/*
  * imrp_application_id_set_data:
  *
  * Set the data unique identifier for a data
@@ -269,6 +283,7 @@ imrp_application_id_set_data (gpointer data,
 
 /**
  * mrp_application_id_get_data:
+ * @object_id: an object id
  *
  * Get the object reference in the list of MrpObjects
  * using the object_id as locator
@@ -281,8 +296,9 @@ mrp_application_id_get_data (guint object_id)
        return g_hash_table_lookup (data_hash, GUINT_TO_POINTER (object_id));
 }
 
-/**
+/*
  * mrp_application_id_get_data:
+ * @object_id: an object id
  *
  * Get the object reference in the list of MrpObjects
  * using the object_id as locator
diff --git a/libplanner/mrp-assignment.c b/libplanner/mrp-assignment.c
index b1c924d..bd546d8 100644
--- a/libplanner/mrp-assignment.c
+++ b/libplanner/mrp-assignment.c
@@ -22,7 +22,13 @@
 
 /**
  * SECTION:mrp-assignment
+ * @Short_Description: assigning resources to tasks.
  * @Title: MrpAssignment
+ * @include: libplanner/mrp-assignment.h
+ *
+ * Resources are assigned to tasks.
+ * #MrpAssignment implements the association between #MrpTask and #MrpResource.
+ * The association is pounded.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-calendar.c b/libplanner/mrp-calendar.c
index 0d7f40b..9066537 100644
--- a/libplanner/mrp-calendar.c
+++ b/libplanner/mrp-calendar.c
@@ -25,6 +25,7 @@
  * SECTION:mrp-calendar
  * @Short_description: represents a calendar in the project.
  * @Title: MrpCalendar
+ * @include: libplanner/mrp-calendar.h
  *
  * A calendar contains the information on working/nonworking time for
  * resources. A calendar has a default week, specifying the day types
diff --git a/libplanner/mrp-day.c b/libplanner/mrp-day.c
index d898816..7ef79f9 100644
--- a/libplanner/mrp-day.c
+++ b/libplanner/mrp-day.c
@@ -23,7 +23,8 @@
 /**
  * SECTION:mrp-day
  * @Short_description: represents a day type in the project.
- * @Title: mrpday
+ * @Title: MrpDay
+ * @include: libplanner/mrp-day.h
  *
  * A day is a specific type of day, such as working day or non-working
  * day. Other examples might be custom types like half day, or a holiday.
diff --git a/libplanner/mrp-error.c b/libplanner/mrp-error.c
index 12034ac..9b1c085 100644
--- a/libplanner/mrp-error.c
+++ b/libplanner/mrp-error.c
@@ -22,7 +22,16 @@
 
 /**
  * SECTION:mrp-error
+ * @Short_Description: Error reporting.
  * @Title: MrpError
+ * @include: libplanner/mrp-error.h
+ *
+ * libplanner uses #GError to report errors.
+ *
+ * The #GQuark "mrp-error-quark" is used as the domain.
+ * Use #MRP_ERROR macro to get it.
+ *
+ * #MrpError lists the error codes used.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-group.c b/libplanner/mrp-group.c
index 9055a48..9e9638e 100644
--- a/libplanner/mrp-group.c
+++ b/libplanner/mrp-group.c
@@ -22,7 +22,19 @@
 
 /**
  * SECTION:mrp-group
+ * @Short_Description: resource groups.
  * @Title: MrpGroup
+ * @include: libplanner/mrp-group.h
+ *
+ * Resources can be grouped.
+ * An #MrpResource can refer to a resource group as his.
+ *
+ * A resource group has got a name.
+ * A resource group has got a manager.
+ *
+ * An #MrpProject maintains a list of resource groups and can designates one as
+ * the default. If you specify a default group, every new #MrpResource that you
+ * add will be placed in this group.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-object.c b/libplanner/mrp-object.c
index b7aed70..ca48ca2 100644
--- a/libplanner/mrp-object.c
+++ b/libplanner/mrp-object.c
@@ -24,7 +24,27 @@
 
 /**
  * SECTION:mrp-object
+ * @Short_Description: libplanner base class.
  * @Title: MrpObject
+ * @include: libplanner/mrp-object.h
+ *
+ * #MrpObject extends #GObject.
+ * Most of @libplanner entities are #MrpObject instances.
+ * Others are #GBoxed like #MrpInterval or #GEnum like #MrpTaskType.
+ * #MrpApplication is a #GObject.
+ *
+ * #MrpObject has no constructor.
+ *
+ * #MrpObject instances belong to a project.
+ *
+ * #MrpObject has properties.
+ *
+ * #MrpApplication can associate pointers to ids.
+ * #MrpObject uses the mechanism to register with
+ * #MrpApplication, gaining an id.
+ * mrp_application_id_get_data() retrieves an #MrpObject given its id.
+ *
+ * #MrpObject signals removal and modification.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-project.c b/libplanner/mrp-project.c
index 6c9a7c5..de77f48 100644
--- a/libplanner/mrp-project.c
+++ b/libplanner/mrp-project.c
@@ -24,7 +24,28 @@
 
 /**
  * SECTION:mrp-project
+ * @Short_description: Projects.
  * @Title: MrpProject
+ * @include: libplanner/mrp-project.h
+ *
+ * A project has got some properties.
+ * One can add his own properties.
+ *
+ * A project maintains a list of #MrpGroup and can designates one as the
+ * default. If you specify a default group, every new #MrpResource that you add
+ * will be placed in this group.
+ *
+ * A project maintains a list of resources.
+ *
+ * A project maintains a list of tasks.
+ * It can iterate over.
+ * Task management is delegated to a private @MrpTaskManager class.
+ *
+ * A project uses a calendar.
+ *
+ * Day types belong to a project.
+ *
+ * A project can define phases and switch from one to another.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-property.c b/libplanner/mrp-property.c
index ec7a2e3..d0b8b97 100644
--- a/libplanner/mrp-property.c
+++ b/libplanner/mrp-property.c
@@ -25,6 +25,7 @@
  * SECTION:mrp-property
  * @Short_description: represents a custom property in the project.
  * @Title: MrpProperty
+ * @include: libplanner/mrp-property.h
  *
  * MrpProperty is a typedef to #GParamSpec. It is used to add properties to
  * projects, resources and tasks in run time, for example by the user of a
diff --git a/libplanner/mrp-relation.c b/libplanner/mrp-relation.c
index 274681b..6b6b254 100644
--- a/libplanner/mrp-relation.c
+++ b/libplanner/mrp-relation.c
@@ -25,6 +25,7 @@
  * SECTION:mrp-relation
  * @Short_description: represents a task predecessor relation in the project.
  * @Title: MrpRelation
+ * @include: libplanner/mrp-relation.h
  *
  * 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,
diff --git a/libplanner/mrp-resource.c b/libplanner/mrp-resource.c
index 101c0bf..d64b851 100644
--- a/libplanner/mrp-resource.c
+++ b/libplanner/mrp-resource.c
@@ -26,6 +26,28 @@
  * SECTION:mrp-resource
  * @Short_description: represents a resource in the project.
  * @Title: MrpResource
+ * @include: libplanner/mrp-resource.h
+ *
+ * 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.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-task.c b/libplanner/mrp-task.c
index c6e5e1f..590a7f8 100644
--- a/libplanner/mrp-task.c
+++ b/libplanner/mrp-task.c
@@ -25,6 +25,38 @@
  * SECTION:mrp-task
  * @Short_description: represents a task in the project.
  * @Title: MrpTask
+ * @include: libplanner/mrp-task.h
+ *
+ * Tasks have a name.
+ *
+ * They form a tree: The work breakdown structure (WBS).
+ *
+ * A task is estimated in term of work effort, the mythical man-month.
+ *
+ * Some tasks are of the fixed-duration type.
+ * They still can consume resources.
+ * Some tasks are milestones.
+ * They take no time, no resource.
+ * They are just markers.
+ *
+ * A task have a time constraint.
+ * By default, it starts as soon as possible.
+ *
+ * Tasks are in logical precedence relationship with each other.
+ *
+ * A task lists the assignments it is involved in.
+ *
+ * During scheduling, start and finish times are calculated.
+ * CPM latest start and latest finish times are also calculated.
+ * Tasks belonging to the critical path are marked.
+ *
+ * A task have a cost.
+ *
+ * A task have a priority.
+ *
+ * A task can retain its progress.
+ *
+ * Because of non-working periods, work might begin after the task start.
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-time.c b/libplanner/mrp-time.c
index db05065..3f8f8ca 100644
--- a/libplanner/mrp-time.c
+++ b/libplanner/mrp-time.c
@@ -23,7 +23,20 @@
 
 /**
  * SECTION:mrp-time
- * @Title: mrptime
+ * @Short_Description: represents date and time.
+ * @Title: MrpTime
+ * @include: libplanner/mrp-time.h
+ *
+ * Two APIs co-exists:
+ * Calendar time with #mrptime and
+ * broken-down time with #MrpTime.
+ *
+ * libplanner does not use #MrpTime.
+ *
+ * ISO 8601 representation is done in the basic format.
+ * Less separators are used:
+ * <literal>20150101T000000Z</literal> for <literal>2015-01-01T00:00:00Z</literal>.
+ *
  */
 
 #include <config.h>
diff --git a/libplanner/mrp-types.c b/libplanner/mrp-types.c
index 32e3f00..d4617dd 100644
--- a/libplanner/mrp-types.c
+++ b/libplanner/mrp-types.c
@@ -20,6 +20,15 @@
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:mrp-types
+ * @Short_Description: miscellaneous declarations.
+ * @Title: MrpType
+ * @include: libplanner/mrp-types.h
+ *
+ * Miscellaneous declarations.
+ */
+
 #include <config.h>
 #include <glib.h>
 #include "mrp-types.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]