Class to represent a user. More...
#include <user.h>


| Public Member Functions | |
| UserType * | userType () const | 
| const QString & | name () const | 
| QList< const Task * > | tasks () const | 
| QList< const Invitation * > | invitations () const | 
| virtual bool | isAdmin () const | 
| Protected Member Functions | |
| User (UserType *type, const QString &name) | |
| virtual | ~User () | 
| Private Member Functions | |
| User (const User &other) | |
| User & | operator= (const User &other) | 
| void | addTask (Task *task) | 
| void | removeTask (Task *task) | 
| void | addInvitation (Invitation *invitation) | 
| void | removeInvitation (Invitation *invitation) | 
| QList< StorableData * > | dependentData () const | 
| Private Attributes | |
| UserPrivate *const | d | 
| Friends | |
| class | TaskManagerData | 
| class | Reservation | 
| class | Task | 
| class | Invitation | 
Class to represent a user.
This class represents a user. A user has a name and can have multiple Task assigned to him/her. A user can also receive Invitation objects and choose to accept or decline these. An object of this class is not an administrator.
A user is always of a certain UserType.
Constructors and destructor are protected, creating and deleting users is handled by the class TaskManagerData.
Definition at line 38 of file user.h.
| domain::User::User | ( | UserType * | type, | |
| const QString & | name | |||
| ) |  [protected] | 
| domain::User::~User | ( | ) |  [protected, virtual] | 
Destructor for a user. This removes all dependent data.
Definition at line 34 of file user.cpp.

| QList< StorableData * > domain::User::dependentData | ( | ) | const  [private, virtual] | 
Data objects depending on the existence of a user are:
Reimplemented from domain::StorableData.
| QList< const Invitation * > domain::User::invitations | ( | ) | const | 
Returns a list with every Invitation this user has received.
| bool domain::User::isAdmin | ( | ) | const  [virtual] | 
Indicates whether this user is an administrator.
Reimplemented in domain::AdminUser.
| const QString & domain::User::name | ( | ) | const | 
| QList< const Task * > domain::User::tasks | ( | ) | const | 
| UserType * domain::User::userType | ( | ) | const | 
 1.6.3
 1.6.3