Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ZtringListListF.h

Go to the documentation of this file.
00001 // ZenLib::ZtringListListF - ZtringListList with files
00002 // Copyright (C) 2002-2005 Jerome 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 //
00023 // ZtringListList with file load/save
00024 //
00025 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00026 //
00027 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00028 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00029 
00030 //---------------------------------------------------------------------------
00031 #ifndef ZtringListListFH
00032 #define ZtringListListFH
00033 //---------------------------------------------------------------------------
00034 
00035 //---------------------------------------------------------------------------
00036 #include <ZenLib/ZtringListList.h>
00037 //---------------------------------------------------------------------------
00038 
00039 namespace ZenLib
00040 {
00041 
00042 //***************************************************************************
00043 /// @brief ZtringListList with file management
00044 //***************************************************************************
00045 
00046 class ZtringListListF : public ZtringListList
00047 {
00048 public :
00049     //Constructors/Destructor
00050     ZtringListListF ();
00051     ZtringListListF (const ZtringListList &Source);
00052     ZtringListListF (const Ztring &Source);
00053     ZtringListListF (const Char *Source);
00054     #ifdef _UNICODE
00055     ZtringListListF (const char *Source); //convert a UTF-8 string into Unicode
00056     #endif
00057 
00058     //File management
00059     size_t Load (const Ztring &FileName=_T(""));
00060     size_t Save (const Ztring &FileName=_T(""));
00061     size_t Cancel ();
00062 
00063     //Configuration
00064     // @brief enable or disable backup creation
00065     void Backup_Set(bool Save);
00066     // @brief Set the count of versions to save
00067     void Backup_Count_Set (size_t Count);
00068     // @brief Set if the content of file is a localized (=not UTF8) file
00069     void Local_Set (bool Local);
00070 
00071 protected :
00072     Ztring Nom; //Nom du fichier
00073     bool Sauvegarde; //Indicateur si on a le droit de sauvegarder (par defaut)
00074     size_t Backup_Nb_Max; //Nombre maxi de sauvegardes
00075     size_t Backup_Nb; //Nombre actuel de backups pour cette session
00076     bool Local; //if true, this is a local charset, else this is a UTF8 charset
00077 
00078     //File management
00079     size_t CSV_Charger ();
00080     size_t CFG_Charger ();
00081     size_t CSV_Sauvegarder ();
00082     size_t CFG_Sauvegarder ();
00083 
00084     //Divers
00085     size_t NettoyerEspaces (Ztring &ANettoyer); //Enlever les espaces avant et apres
00086 
00087 private:
00088     void ZtringListListF_Common();
00089 };
00090 
00091 } //Namespace
00092 
00093 #endif
00094 

Generated on Sun Oct 16 20:41:19 2005 for ZenLib by doxygen1.3-rc3