Administration

From TaskDepender
Jump to: navigation, search
(Functionality)
 
Line 1: Line 1:
 
''This page describes the Administration layer of the TaskDepender™ program.''
 
''This page describes the Administration layer of the TaskDepender™ program.''
  
== Introduction ==
+
== Description ==
  
The Administration is an API to the database that in one direction shields the GUI from handling the database transactions and in the other direction shields the Administration from being dependent on the implementation of the GUI.
+
The Administration is an API to the [[Database|database]] that in one direction shields the GUI from handling the database transactions and in the other direction shields the Administration from being dependent on the implementation of the [[GUI]].
  
 
== Functionality ==
 
== Functionality ==
  
The Administration holds functionality that closely corresponds to that as implemented by the program. The functionality is split-up into 2 groups:
+
=== Consistency ===
* Project handling
+
* Data editing
+
* State change
+
  
=== Project handling ===
+
Besides the API functions, the Administration API also requires some internal methods to ensure consistency and implement the restrictions. There are:
 +
* [[Checking cyclicity]]
  
* Open new project
+
=== Other methods ===
* Save project
+
* Rename project
+
 
+
=== Data editing ===
+
 
+
* Add a task
+
* Change properties of a task
+
* Add a deliverable
+
* Change properties of a deliverable
+
* Select task(s)
+
* Select deliverable(s)
+
* Delete (all) selected element(s)
+
 
+
=== State change ===
+
 
+
* Select task(s)
+
* Select deliverable(s)
+
* Change current container
+
* Save
+
  
 +
* [[Create tasks and deliverables lists]]
 +
* [[Find methods]]
  
 
== Design ==
 
== Design ==
Line 56: Line 37:
 
The Administration can return a [[Task class|task]], a [[Tasks administration class|lists of tasks]],  a [[Deliverable class|deliverable]] or a [[Deliverables administration class|lists of Deliverables]].
 
The Administration can return a [[Task class|task]], a [[Tasks administration class|lists of tasks]],  a [[Deliverable class|deliverable]] or a [[Deliverables administration class|lists of Deliverables]].
  
== Classes and structures ==
+
== Implementation ==
 +
 
 +
<syntaxhighlight lang="cpp">
 +
class AdminC
 +
{
 +
private:
 +
  sqlite3 *DatabaseHandle;  // SQLite db handle.
 +
  char    *DatabaseFilename; 
 +
 
 +
  uint    EditsCounter;
 +
 
 +
  uint32 AllowedActions;
 +
 
 +
  bool Cyclic( TaskC *beginTask, TaskC *endTask );
 +
  void DeleteDeliverable( uint32 id );
 +
  void DeleteTask( uint32 id );
 +
 
 +
  IntegerArrayC *SelectedTasksIds;
 +
  IntegerArrayC *SelectedDeliverablesIds;
 +
 
 +
public:
 +
  AdminC(void);
 +
  ~AdminC(void);
 +
 
 +
  TasksAdminC        *TasksAdmin;
 +
  DeliverablesAdminC *DeliverablesAdmin;
 +
 
 +
  void DeleteSelectedElements(void);
 +
 
 +
  void Disconnect( TaskC *task, DeliverableC *deliverable );
 +
  void Connect( TaskC *task, DeliverableC
 +
 
 +
  void DetermineContainedElements(void);
 +
 
 +
  void Undo(void);
 +
 
 +
  AdminC *Copy(void);
 +
};
 +
</syntaxhighlight>
 +
 
 +
== Used classes and structures ==
  
[[Administration classes and structures]]
+
* [[Generic types]]
 +
* [[Task class]]
 +
* [[Tasks administration class]]
 +
* [[Deliverable class]]
 +
* [[Deliverables administration class]]

Latest revision as of 09:37, 23 October 2011

Personal tools