forked from felixmt/LO21
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NoteFactory.h
47 lines (42 loc) · 1.24 KB
/
NoteFactory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* \file NoteFactory.h
* \author Félix, Victor
* \version 1.0
* \date 15 Juin 2013
* \brief gestion de la creation des notes, classe abstraite
*/
#include "note.h"
#include <QString>
#ifndef NOTEFACTORY_H
#define NOTEFACTORY_H
/**
* \class NoteFactory NoteFactory.h
*/
class NoteFactory
{
friend class NoteManager;
public:
/**
* \brief Fonction qui genere un nouvel id pour une note
*/
static unsigned int getNewId();
/**
* \brief Fonction virtuelle pure qui cree une nouvelle note
* \param title titre de la note a creer
*/
virtual Note* buildNoteNew(QString& title)=0;
/**
* \brief Fonction static qui permet de choisir la bonne fabrique pour construire le type d'objet demande
* \param title titre de la note a creer
* \param type type de la note a creer
*/
static NoteFactory* chooseFactory(QString& title,QString& type); // choisi la bonne fabrique pour construire le type d'objet demandé par noteManager
/**
* \brief Fonction qui permet de generer le nom de fichier d'une note
* \param id id de la note a creer
* \param type type de la note a creer
* \return Un QString qui est le nom de fichier genere
*/
QString getNewFilename(QString& type, unsigned int id);
};
#endif // NOTEFACTORY_H