1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
class donnees
{
public:
donnees(const char* nom_fichier = "anecdotes.xml");
int nb_elements() const;
QString lire(int i) const;
char lire_type(int i) const;
void ajouter(char typea, QString phrase_a_ajouter, int i = 1);
void enregistrer();//A implémenter
void ajouter_anecdote(char type, QString tt);
void actualiser(char type, QString tt, int i);
bool return_etat_fichier() const; //renvoie la valeur de fichier_charge
private:
TiXmlDocument document;
bool fichier_charge; //est mis à true si le fichier xml s'est correctement chargé, false sinon.
int nb_elemts;
std::vector<anecdote> anecdotes;
const char* nom_xml;
}; |
Partager