control::DataLoader Class Reference

Class to load data from a file into the domain layer. More...

#include <dataloader.h>

Inheritance diagram for control::DataLoader:
Inheritance graph
[legend]
Collaboration diagram for control::DataLoader:
Collaboration graph
[legend]

List of all members.

Classes

struct  TaskData

Public Member Functions

QString description () const
QString name () const
DataType dataType () const
ActionType actionType () const
void init (domain::TaskManagerData *data, ui::UiInterface *ui, ControllerFactory *factory)

Private Member Functions

void execute ()
bool userIsValid () const
bool load (const QDomElement &root)
bool loadProject (const QDomElement &project)
bool loadProjects (const QDomElement &projects)
bool loadResource (const QDomElement &resource)
bool loadResources (const QDomElement &resources)
bool loadUser (const QDomElement &user)
bool loadTask (const QDomElement &task, domain::User *userPointer)
bool loadTasks (const QDomElement &tasks, domain::User *userPointer)
bool loadReservations (const QDomElement &reservations, const QString &taskRef)
bool loadReservation (const QDomElement &reservation, const QString &taskRef)
bool loadInvitations ()
bool createTasks ()

Private Attributes

QMap< QString, TaskDatataskData
QMap< QString, domain::Resource * > resourceRefs
QMap< QString, domain::Project * > projectRefs
QMap< QString, domain::Task * > taskRefs
QMap< QString, domain::User * > userRefs
QMultiMap< QString, QString > taskInvitees
QMultiMap< domain::User
*, QMap< QString, QString > > 
userInvitees
ControllerInterfacethemeLoader

Detailed Description

Class to load data from a file into the domain layer.

This class can be used by an interface to populate a TaskManagerData. The file used for this should be conform with the following schema: "http:// www.cs.kuleuven.be/mop http://www.cs.kuleuven.be/~thomash/mop_iteratie1.xsd". If the specied file does not completely follows this shema, the result of execute() will leave the domain layer in consistent state. However, it is possible thad only a part of the file is added to TaskManagerData.

Definition at line 37 of file dataloader.h.


Member Function Documentation

ControllerInterface::ActionType DataLoader::actionType (  )  const [virtual]

Returns the action type of the controller

Implements control::ControllerInterface.

Definition at line 40 of file dataloader.cpp.

ControllerInterface::DataType DataLoader::dataType (  )  const [virtual]

Returns the data type on which the controller acts

Implements control::ControllerInterface.

Definition at line 35 of file dataloader.cpp.

QString DataLoader::description (  )  const [virtual]

Returns the description of the controller

Implements control::ControllerInterface.

Definition at line 25 of file dataloader.cpp.

void DataLoader::execute (  )  [private, virtual]

Executes a whole use case

Implements control::ControllerInterface.

Definition at line 61 of file dataloader.cpp.

Here is the call graph for this function:

void DataLoader::init ( domain::TaskManagerData data,
ui::UiInterface ui,
ControllerFactory factory 
) [virtual]

Initiates the controller with a pointer to a TaskManagerData object, a user interface and a controller factory

Parameters:
data Pointer to TaskManagerData object
ui Pointer to a user interface
factory Pointer to a controller factory
See also:
domain::TaskManagerData, ui::UiInterface, ControllerFactory

Reimplemented from control::ControllerInterface.

Definition at line 45 of file dataloader.cpp.

QString DataLoader::name (  )  const [virtual]

Returns the name of the controller

Implements control::ControllerInterface.

Definition at line 30 of file dataloader.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator
Generated on Thu May 27 14:20:07 2010 for MopTaskManager by  doxygen 1.6.3