-
Notifications
You must be signed in to change notification settings - Fork 1
/
moteurbd.h
48 lines (36 loc) · 1.02 KB
/
moteurbd.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
48
#ifndef MOTEURBD_H
#define MOTEURBD_H
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include "structures.h"
#include <map>
#include <cJSON/cJSON.h>
#include <time.h>
using namespace std;
//using namespace JSON;
class MoteurBD
{
private:
map<DonneeElementaire, DonneeElementaire> *m_map;
int m_compteur;
public:
MoteurBD();
~MoteurBD();
// visualisation
void afficherDonnees();
// manipulation de données
bool ajouterDonnee(DonneeElementaire clef,DonneeElementaire valeur);
bool supprimerDonnee(DonneeElementaire clef);
bool modifierDonneee(DonneeElementaire clef,DonneeElementaire valeur);
DonneeElementaire genererClef();
DonneeElementaire genererClef(int n);
// lecture des données
DonneeElementaire lireclef(DonneeElementaire clef); // valeur associée à clef
// fichier
void charger();
void sauvegarder();
// Interface réseau (à faire)
};
bool operator < (const DonneeElementaire &b, const DonneeElementaire &c);
#endif // MOTEURBD_H