00001 // ZenLib::ZtringListListF - ZtringListList with files 00002 // Copyright (C) 2002-2003 Jérôme Martinez, Zen@MediaArea.net 00003 // 00004 // This software is provided 'as-is', without any express or implied 00005 // warranty. In no event will the authors be held liable for any damages 00006 // arising from the use of this software. 00007 // 00008 // Permission is granted to anyone to use this software for any purpose, 00009 // including commercial applications, and to alter it and redistribute it 00010 // freely, subject to the following restrictions: 00011 // 00012 // 1. The origin of this software must not be misrepresented; you must not 00013 // claim that you wrote the original software. If you use this software 00014 // in a product, an acknowledgment in the product documentation would be 00015 // appreciated but is not required. 00016 // 2. Altered source versions must be plainly marked as such, and must not be 00017 // misrepresented as being the original software. 00018 // 3. This notice may not be removed or altered from any source distribution. 00019 // 00020 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00021 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00022 // ZtringListList 00023 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00024 // 00025 // Version 1.0.0 00026 // ------------- 00027 // Gestion d'un tableau de CChaine avec option de chargement/sauvegarde 00028 // Sauvegarde au format CSV ou CFG 00029 // 00030 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00031 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00032 // 00033 // 1.0.0 00034 // Nettoyages 00035 // 00036 // 0.0.4 00037 // Possibilite de desactiver la sauvegarde 00038 // Definition du nombre de backup maxi 00039 // 00040 // 0.0.3 00041 // Gestion de 10 backups maxi 00042 // 00043 // 0.0.2 00044 // Chargement/Sauvegarde CFG 00045 // 00046 // 0.0.1 00047 // Chargement/Sauvegarde CSV 00048 // 00049 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00050 00051 //--------------------------------------------------------------------------- 00052 #ifndef ZtringListListFH 00053 #define ZtringListListFH 00054 //--------------------------------------------------------------------------- 00055 00056 //--------------------------------------------------------------------------- 00057 #include <ZenLib/ZtringListList.h> 00058 //--------------------------------------------------------------------------- 00059 00060 namespace ZenLib 00061 { 00062 00063 00064 //*************************************************************************** 00065 // Classe CChaine_Tableau2F 00066 //*************************************************************************** 00067 00068 class ZtringListListF : public ZtringListList 00069 { 00070 public : 00071 //Gestion de la classe 00072 ZtringListListF (int Taille2=1, int TailleBase1=1, const Ztring &Separateur1="\r\n", const Ztring &Separateur2=";", const char *Source=""); 00073 ~ZtringListListF (); 00074 00075 //Gestion disque 00076 int Charger (const Ztring &Fichier=""); 00077 int Sauvegarder (const Ztring &Fichier=""); 00078 int Annuler (); 00079 00080 //Divers 00081 int Sauvegarde_Set(bool Sauvegarde); // activer ou desactiver la sauvegarde sur disque 00082 int Backup_Set (int Nombre); //Nombre de backup 00083 00084 protected : 00085 Ztring Nom; //Nom du fichier 00086 bool Sauvegarde; //Indicateur si on a le droit de sauvegarder (par defaut) 00087 int Backup_Nb_Max; //Nombre maxi de sauvegardes 00088 int Backup_Nb; //Nombre actuel de backups pour cette session 00089 00090 //Chargement 00091 int CSV_Charger (); 00092 int CFG_Charger (); 00093 00094 //Sauvegarde 00095 int CSV_Sauvegarder (); 00096 int CFG_Sauvegarder (); 00097 00098 //Divers 00099 int NettoyerEspaces (Ztring &ANettoyer); //Enlever les espaces avant et apres 00100 }; 00101 00102 } //Namespace 00103 00104 #endif 00105