ZenLib
ZtringListListF.h
Go to the documentation of this file.
1/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
2 *
3 * Use of this source code is governed by a zlib-style license that can
4 * be found in the License.txt file in the root of the source tree.
5 */
6
7//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8//
9// ZtringListList with file load/save
10//
11//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
13//---------------------------------------------------------------------------
14#ifndef ZtringListListFH
15#define ZtringListListFH
16//---------------------------------------------------------------------------
17
18//---------------------------------------------------------------------------
20//---------------------------------------------------------------------------
21
22namespace ZenLib
23{
24
25//***************************************************************************
26/// @brief ZtringListList with file management
27//***************************************************************************
28
30{
31public :
32 //Constructors/Destructor
35 ZtringListListF (const Ztring &Source);
36 ZtringListListF (const Char *Source);
37 #ifdef _UNICODE
38 ZtringListListF (const char *Source); //convert a UTF-8 string into Unicode
39 #endif
40
41 //File management
42 bool Load (const Ztring &FileName=Ztring());
43 bool Save (const Ztring &FileName=Ztring());
44 bool Cancel ();
45
46 //Configuration
47 // @brief enable or disable backup creation
48 void Backup_Set (bool Save);
49 // @brief Set the count of versions to save
50 void Backup_Count_Set (int8u Count);
51 // @brief Set if the content of file is a localized (=not UTF8) file
52 void Local_Set (bool Local);
53
54protected :
55 Ztring Name; //Nom du fichier
56 bool Sauvegarde; //Indicateur si on a le droit de sauvegarder (par defaut)
57 int8u Backup_Nb_Max; //Nombre maxi de sauvegardes
58 int8u Backup_Nb; //Nombre actuel de backups pour cette session
59 bool Local; //if true, this is a local charset, else this is a UTF8 charset
60
61 //File management
62 bool CSV_Charger ();
63 bool CFG_Charger ();
66 bool File_Load ();
67
68 //Divers
69 bool NettoyerEspaces (Ztring &ANettoyer); //Enlever les espaces avant et apres
70
71private:
72 void ZtringListListF_Common();
73};
74
75} //Namespace
76
77#endif
File name manipulation.
Definition FileName.h:30
ZtringListList with file management.
Definition ZtringListListF.h:30
bool Sauvegarde
Definition ZtringListListF.h:56
int8u Backup_Nb_Max
Definition ZtringListListF.h:57
void Backup_Count_Set(int8u Count)
bool Load(const Ztring &FileName=Ztring())
bool NettoyerEspaces(Ztring &ANettoyer)
Ztring Name
Definition ZtringListListF.h:55
int8u Backup_Nb
Definition ZtringListListF.h:58
bool Local
Definition ZtringListListF.h:59
bool Save(const Ztring &FileName=Ztring())
ZtringListListF(const ZtringListList &Source)
void Local_Set(bool Local)
ZtringListListF(const Char *Source)
void Backup_Set(bool Save)
ZtringListListF(const Ztring &Source)
Vector of vectors of strings manipulation (based on std::vector<std::vector<std::(w)string>>)
Definition ZtringListList.h:30
String manipulation (based on std::(w)string)
Definition Ztring.h:50
Definition BitStream.h:24
char Char
Definition Conf.h:225