4 Ok(true), MsgStr(
"Ok"), MacroCh(_MacroCh), VarCh(_VarCh),
5 TxtStr(_TxtStr), SubstToValStrH(10), VarNmToValStrH(10){
6 int TxtStrLen=
TxtStr.
Len();
int TxtStrChN=0;
7 while ((
Ok)&&(TxtStrChN<TxtStrLen)){
10 TChA SubstChA; TxtStrChN++;
12 SubstChA+=
TxtStr[TxtStrChN]; TxtStrChN++;}
13 Ok=(TxtStrChN<TxtStrLen);
19 while ((
Ok)&&(SubstChN<SubstChA.
Len())){
20 if (SubstChA[SubstChN]==
VarCh){
21 TChA VarNmChA; SubstChN++;
22 while ((SubstChN<SubstChA.
Len())&&(SubstChA[SubstChN]!=
VarCh)){
23 VarNmChA+=SubstChA[SubstChN]; SubstChN++;}
24 Ok=(SubstChN<SubstChA.
Len());
39 int TxtStrLen=
TxtStr.
Len();
int TxtStrChN=0;
41 while (TxtStrChN<TxtStrLen){
43 TChA SubstChA; TxtStrChN++;
45 SubstChA+=
TxtStr[TxtStrChN]; TxtStrChN++;}
54 DstTxtChA+=
TxtStr[TxtStrChN]; TxtStrChN++;
62 for (
int SubstStrN=0; SubstStrN<
GetSubstStrs(); SubstStrN++){
69 int SrcSubstStrLen=SrcSubstStr.
Len();
72 while (SrcSubstChN<SrcSubstStrLen){
73 if (SrcSubstStr[SrcSubstChN]==
VarCh){
74 TChA VarNmChA; SrcSubstChN++;
75 while ((SrcSubstChN<SrcSubstStrLen)&&(SrcSubstStr[SrcSubstChN]!=
VarCh)){
76 VarNmChA+=SrcSubstStr[SrcSubstChN]; SrcSubstChN++;}
77 IAssert(SrcSubstChN<SrcSubstStrLen); SrcSubstChN++;
81 DstSubstChA+=SrcSubstStr[SrcSubstChN]; SrcSubstChN++;
89 for (
int SubstStrN=0; SubstStrN<
GetSubstStrs(); SubstStrN++){
90 if (SubstStrN>0){AllSubstValChA+=
", ";}
93 return AllSubstValChA;
98 for (
int VarN=0; VarN<
GetVars(); VarN++){
105 bool& IsComboBox,
TStr& TbNm,
TStr& ListFldNm,
TStr& DataFldNm){
107 CapStr=VarNm; IsComboBox=
false; TbNm=
""; ListFldNm=
""; DataFldNm=
"";
109 int FirstColonChN=VarNm.
SearchCh(
':');
110 int SecondColonChN=VarNm.
SearchCh(
':', FirstColonChN+1);
111 int ThirdColonChN=VarNm.
SearchCh(
':', SecondColonChN+1);
112 IAssert((FirstColonChN!=-1)&&(SecondColonChN!=-1));
113 if (ThirdColonChN==-1){ThirdColonChN=VarNm.
Len();}
114 CapStr=VarNm.
GetSubStr(0, FirstColonChN-1);
116 TbNm=VarNm.
GetSubStr(FirstColonChN+1, SecondColonChN-1);
117 ListFldNm=VarNm.
GetSubStr(SecondColonChN+1, ThirdColonChN-1);
118 if (ThirdColonChN!=VarNm.
Len()){
119 DataFldNm=VarNm.
GetSubStr(ThirdColonChN+1, VarNm.
Len()-1);
int SearchCh(const char &Ch, const int &BChN=0) const
TStr GetAllSubstValStr() const
TStr GetSubStr(const int &BChN, const int &EChN) const
TStr GetVarVal(const TStr &VarNm) const
TStr GetSrcSubstStr(const int &SubstStrN) const
static void SplitVarNm(const TStr &VarNm, TStr &CapStr, bool &IsComboBox, TStr &TbNm, TStr &ListFldNm, TStr &DataFldNm)
TStr GetVarNm(const int &VarN) const
void GetVarNmV(TStrV &VarNmV) const
TStr GetDstTxtStr() const
TStr GetDstSubstStr(const int &SubstStrN=0) const
TMacro(const TStr &TxtStr, const char &_MacroCh='$', const char &_VarCh='#')
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
bool IsKey(const TKey &Key) const
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
TStr GetSubstValStr(const int &SubstStrN) const
TDat & AddDat(const TKey &Key)
const TKey & GetKey(const int &KeyId) const
void GetSrcSubstStrV(TStrV &SubstStrV) const