00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ZenLib_ZtringListListH
00015 #define ZenLib_ZtringListListH
00016
00017
00018
00019 #include "ZenLib/ZtringList.h"
00020
00021
00022 namespace ZenLib
00023 {
00024
00025
00026
00027
00028
00029 class ZtringListList : public std::vector<ZtringList>
00030 {
00031 public :
00032
00033 ZtringListList ();
00034 ZtringListList (const ZtringListList &Source);
00035 ZtringListList (const Ztring &Source);
00036 ZtringListList (const Char *Source);
00037 #ifdef _UNICODE
00038 ZtringListList (const char *Source);
00039 #endif
00040
00041
00042 bool operator == (const ZtringListList &Source) const;
00043 bool operator != (const ZtringListList &Source) const;
00044 ZtringListList &operator += (const ZtringListList &Source);
00045 ZtringListList &operator = (const ZtringListList &Source);
00046
00047 ZtringList &operator () (size_type Pos0);
00048 Ztring &operator () (size_type Pos0, size_type Pos1);
00049
00050 Ztring &operator () (const Ztring &Pos0, size_type Pos1=1) {return operator() (Pos0, 0 , Pos1);};
00051
00052 Ztring &operator () (const Ztring &Pos0, size_type Pos0_1, size_type Pos1);
00053
00054
00055
00056 Ztring Read () const;
00057
00058 Ztring Read (size_type Pos0) const;
00059
00060 const Ztring &Read (size_type Pos0, size_type Pos1) const;
00061
00062 const Ztring &Read (const Ztring &Pos0, size_type Pos1=1) const;
00063
00064 const Ztring &Read (const Ztring &Pos0, size_type Pos0_1, size_type Pos1) const;
00065
00066 const Ztring &Read (const Ztring &Pos0, const Ztring &Default, size_type Pos1=1) const;
00067
00068 const Ztring &Read (const Ztring &Pos0, const Ztring &Default, size_type Pos0_1, size_type Pos1) const;
00069
00070 Ztring Read1 (size_type Pos1) const;
00071
00072
00073 void Write (const Ztring &ToWrite);
00074
00075 void Write (const ZtringList &ToWrite, size_type Pos0);
00076
00077 void Write (const Ztring &ToWrite, size_type Pos0, size_type Pos1);
00078
00079 void push_back (const ZtringList &ToAdd);
00080
00081 void push_back (const Ztring &ToAdd);
00082
00083 void push_back (const Char* ToAdd) {push_back(Ztring(ToAdd));};
00084
00085 void Insert (const ZtringList &ToInsert, size_type Pos0) {insert(begin()+Pos0, ToInsert);};
00086
00087 void Insert1 (const Ztring &ToInsert, size_type Pos1);
00088
00089 void Delete (size_type Pos0) {erase(begin()+Pos0);};
00090
00091 void Delete (const Ztring &ToFind, size_type Pos1=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing);
00092
00093 void Delete1 (size_type Pos1);
00094
00095
00096
00097 void Swap (size_type Pos0_A, size_type Pos0_B);
00098
00099 void Swap1 (size_type Pos1_A, size_type Pos1_B);
00100
00101 void Sort (size_type Pos1, ztring_t Options=Ztring_Nothing);
00102
00103
00104
00105 size_type Find (const Ztring &ToFind, size_type Pos1=0, size_type Pos0Begin=0) const;
00106
00107 size_type Find_Filled (size_type Pos1=0, size_type Pos0Begin=0) const;
00108
00109 size_type Find (const Ztring &ToFind, size_type Pos1, size_type Pos0Begin, const Ztring &Comparator, ztring_t Options=Ztring_Nothing) const;
00110
00111 Ztring FindValue (const Ztring &ToFind, size_type Pos1Value=1, size_type Pos1=0, size_type Pos0Begin=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
00112
00113 ZtringListList SubSheet (const Ztring &ToFind, size_type Pos1=0, size_type Pos0Begin=0, const Ztring &Comparator=__T("=="), ztring_t Options=Ztring_Nothing) const;
00114
00115
00116
00117 void Separator_Set (size_type Level, const Ztring &NewSeparator);
00118
00119
00120 void Quote_Set (const Ztring &NewQuote);
00121
00122
00123 void Max_Set (size_type Level, size_type Max);
00124
00125 protected :
00126 Ztring Separator[2];
00127 Ztring Quote;
00128 size_type Max[2];
00129 };
00130
00131 }
00132 #endif