SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <html.h>
Public Types | |
typedef TStrKdV | TArgNmValV |
Public Member Functions | |
THtmlLx (const PSIn &_SIn, const bool &_DoParseArg=true) | |
THtmlLx & | operator= (const THtmlLx &) |
void | PutCh (const char &_Ch) |
void | PutStr (const TStr &Str) |
THtmlLxSym | GetSym () |
PHtmlTok | GetTok (const bool &DoUc=true) |
TStr | GetPreSpaceStr () const |
int | GetArgs () const |
TStr | GetArgNm (const int &ArgN) const |
TStr | GetArgVal (const int &ArgN) const |
bool | IsArg (const TStr &ArgNm) const |
TStr | GetArg (const TStr &ArgNm, const TStr &DfArgVal=TStr()) const |
void | PutArg (const TStr &ArgNm, const TStr &ArgVal) |
TStr | GetFullBTagStr () const |
void | MoveToStrOrEof (const TStr &Str) |
void | MoveToBTagOrEof (const TStr &TagNm) |
void | MoveToBTag2OrEof (const TStr &TagNm1, const TStr &TagNm2) |
void | MoveToBTag3OrEof (const TStr &TagNm1, const TStr &TagNm2, const TStr &TagNm3) |
void | MoveToBTagOrETagOrEof (const TStr &BTagNm, const TStr &ETagNm) |
void | MoveToBTagArgOrEof (const TStr &TagNm, const TStr &ArgNm, const TStr &ArgVal) |
void | MoveToBTagArg2OrEof (const TStr &TagNm, const TStr &ArgNm1, const TStr &ArgVal1, const TStr &ArgNm2, const TStr &ArgVal2, const bool &AndOpP=true) |
void | MoveToBTagOrEof (const TStr &TagNm1, const TStr &ArgNm1, const TStr &ArgVal1, const TStr &TagNm2, const TStr &ArgNm2, const TStr &ArgVal2) |
void | MoveToETagOrEof (const TStr &TagNm) |
TStr | GetTextOnlyStrToEof () |
TStr | GetStrToBTag (const TStr &TagNm, const bool &TxtOnlyP=false) |
TStr | GetStrToBTag (const TStr &TagNm, const TStr &ArgNm, const TStr &ArgVal, const bool &TxtOnlyP=false) |
TStr | GetStrToETag (const TStr &TagNm, const bool &TxtOnlyP=false) |
TStr | GetStrToETag2 (const TStr &TagNm1, const TStr &TagNm2, const bool &TxtOnlyP=false) |
TStr | GetStrInTag (const TStr &TagNm, const bool &TxtOnlyP=false) |
TStr | GetHRefBeforeStr (const TStr &Str) |
bool | IsGetBTag (const TStr &TagNm) |
bool | IsGetETag (const TStr &TagNm) |
Static Public Member Functions | |
static TStr | GetSymStr (const THtmlLxSym &Sym) |
static TStr | GetEscapedStr (const TChA &ChA) |
static TStr | GetAsciiStr (const TChA &ChA, const char &GenericCh='_') |
static void | GetTokStrV (const TStr &Str, TStrV &TokStrV) |
static TStr | GetNoTag (const TStr &Str) |
Public Attributes | |
THtmlLxSym | Sym |
int | SymBChX |
int | SymEChX |
TChA | ChA |
TChA | UcChA |
TChA | SymChA |
int | PreSpaces |
TChA | PreSpaceChA |
TArgNmValV | ArgNmValV |
Private Member Functions | |
void | GetCh () |
void | GetEscCh () |
void | GetMetaTag () |
void | GetTag () |
Private Attributes | |
PSIn | SIn |
TSIn & | RSIn |
bool | DoParseArg |
TChA | ChStack |
char | Ch |
int | ChX |
bool | EscCh |
TChA | EscChA |
TChA | ArgNm |
TChA | ArgVal |
Static Private Attributes | |
static THtmlLxChDef | ChDef |
typedef TStrKdV THtmlLx::TArgNmValV |
THtmlLx::THtmlLx | ( | const PSIn & | _SIn, |
const bool & | _DoParseArg = true |
||
) | [inline] |
TStr THtmlLx::GetArg | ( | const TStr & | ArgNm, |
const TStr & | DfArgVal = TStr() |
||
) | const [inline] |
Definition at line 139 of file html.h.
References ArgNmValV, and TVec< TVal, TSizeTy >::SearchForw().
Referenced by THtmlDoc::_IsTagRedir(), GetHRefBeforeStr(), GetStrToBTag(), MoveToBTagArg2OrEof(), MoveToBTagArgOrEof(), and MoveToBTagOrEof().
{ int ArgN=ArgNmValV.SearchForw(TStrKd(ArgNm)); if (ArgN==-1){return DfArgVal;} else {return ArgNmValV[ArgN].Dat;}}
TStr THtmlLx::GetArgNm | ( | const int & | ArgN | ) | const [inline] |
Definition at line 136 of file html.h.
References ArgNmValV.
Referenced by GetFullBTagStr(), and THtmlDoc::SaveHtmlToXml().
{return ArgNmValV[ArgN].Key;}
int THtmlLx::GetArgs | ( | ) | const [inline] |
Definition at line 135 of file html.h.
References ArgNmValV, and TVec< TVal, TSizeTy >::Len().
Referenced by GetFullBTagStr(), and THtmlDoc::SaveHtmlToXml().
TStr THtmlLx::GetArgVal | ( | const int & | ArgN | ) | const [inline] |
Definition at line 137 of file html.h.
References ArgNmValV.
Referenced by GetFullBTagStr(), and THtmlDoc::SaveHtmlToXml().
{return ArgNmValV[ArgN].Dat;}
TStr THtmlLx::GetAsciiStr | ( | const TChA & | ChA, |
const char & | GenericCh = '_' |
||
) | [static] |
void THtmlLx::GetCh | ( | ) | [inline, private] |
Definition at line 95 of file html.h.
References Ch, ChStack, ChX, TChA::Empty(), TSIn::Eof(), TCh::EofCh, TSIn::GetCh(), TChA::Pop(), RSIn, and SymChA.
Referenced by GetEscCh(), GetMetaTag(), GetSym(), and GetTag().
{ if (ChStack.Empty()){ if (RSIn.Eof()){Ch=TCh::EofCh;} else {Ch=RSIn.GetCh(); ChX++;} } else { Ch=ChStack.Pop(); ChX++; } SymChA+=Ch; }
TStr THtmlLx::GetEscapedStr | ( | const TChA & | ChA | ) | [static] |
Definition at line 568 of file html.cpp.
References Ch, and TChA::Len().
{ TChA EscapedChA; for (int ChN=0; ChN<ChA.Len(); ChN++){ char Ch=ChA[ChN]; switch (Ch){ case '"': EscapedChA+="""; break; case '&': EscapedChA+="&"; break; case '\'': EscapedChA+="'"; break; case '<': EscapedChA+="<"; break; case '>': EscapedChA+=">"; break; default: EscapedChA+=Ch; } } return EscapedChA; }
void THtmlLx::GetEscCh | ( | ) | [private] |
Definition at line 195 of file html.cpp.
References TChA::AddCh(), Ch, ChDef, TChA::Clr(), EscCh, EscChA, GetCh(), THtmlLxChDef::GetEscStr(), PutCh(), and PutStr().
Referenced by GetMetaTag(), GetSym(), and GetTag().
{ GetCh(); EscCh=(Ch=='&'); if (EscCh){ EscChA.Clr(); EscChA.AddCh(Ch); GetCh(); if (Ch=='#'){ EscChA.AddCh(Ch); GetCh(); if (('0'<=Ch)&&(Ch<='9')){ do {EscChA.AddCh(Ch); GetCh();} while (('0'<=Ch)&&(Ch<='9')); if (Ch==';'){GetCh();} PutStr(ChDef.GetEscStr(EscChA)); } else { PutCh('#'); PutCh('&'); } } else if ((('a'<=Ch)&&(Ch<='z'))||(('A'<=Ch)&&(Ch<='Z'))){ do { EscChA.AddCh(Ch); GetCh(); } while ((('A'<=Ch)&&(Ch<='Z'))||(('a'<=Ch)&&(Ch<='z'))||(('0'<=Ch)&&(Ch<='9'))); if (Ch==';'){ GetCh(); PutStr(ChDef.GetEscStr(EscChA)); } else { PutStr(EscChA); } } else { PutCh('&'); } } }
TStr THtmlLx::GetFullBTagStr | ( | ) | const |
Definition at line 358 of file html.cpp.
References ChA, GetArgNm(), GetArgs(), GetArgVal(), hsyBTag, IAssert, TChA::Pop(), and Sym.
Referenced by THtmlDoc::GetRedirHtmlDocStr().
{ IAssert(Sym==hsyBTag); TChA BTagChA; BTagChA+=ChA; BTagChA.Pop(); for (int ArgN=0; ArgN<GetArgs(); ArgN++){ BTagChA+=' '; BTagChA+=GetArgNm(ArgN); BTagChA+='='; BTagChA+='"'; BTagChA+=GetArgVal(ArgN); BTagChA+='"'; } BTagChA+='>'; return BTagChA; }
TStr THtmlLx::GetHRefBeforeStr | ( | const TStr & | Str | ) |
Definition at line 530 of file html.cpp.
References ChA, forever, GetArg(), GetSym(), hsyBTag, hsyEof, hsyStr, Sym, and UcChA.
{ TStr HRefStr; forever { GetSym(); if (Sym==hsyEof){HRefStr=""; break;} if ((Sym==hsyBTag)&&(UcChA=="<A>")){HRefStr=GetArg("HREF");} if ((Sym==hsyStr)&&(ChA==Str)){break;} } return HRefStr; }
void THtmlLx::GetMetaTag | ( | ) | [private] |
Definition at line 225 of file html.cpp.
References Ch, TCh::EofCh, GetCh(), GetEscCh(), hsyMTag, and Sym.
Referenced by GetSym().
{ Sym=hsyMTag; if (Ch=='-'){ char PCh=' '; while ((Ch!=TCh::EofCh) && ((PCh!='-')||(Ch!='>'))){PCh=Ch; GetCh();} } else { while ((Ch!=TCh::EofCh) && (Ch!='>')){GetCh();} } if (Ch!=TCh::EofCh){GetEscCh();} }
TStr THtmlLx::GetNoTag | ( | const TStr & | Str | ) | [static] |
Definition at line 606 of file html.cpp.
References ChA, GetSym(), hsyEof, hsyNum, hsySSym, hsyStr, hsyUndef, TStrIn::New(), PreSpaces, SIn, and Sym.
{ PSIn SIn=TStrIn::New(Str); THtmlLx Lx(SIn); Lx.GetSym(); TChA ChA; while (Lx.Sym!=hsyEof){ switch (Lx.Sym){ case hsyUndef: case hsyStr: case hsyNum: case hsySSym: if (Lx.PreSpaces > 0) { ChA += ' '; } ChA += Lx.ChA; default: break; } Lx.GetSym(); } return ChA; }
TStr THtmlLx::GetPreSpaceStr | ( | ) | const [inline] |
Definition at line 132 of file html.h.
References TStr::GetSpaceStr(), and PreSpaces.
{ return TStr::GetSpaceStr(PreSpaces);}
TStr THtmlLx::GetStrInTag | ( | const TStr & | TagNm, |
const bool & | TxtOnlyP = false |
||
) |
Definition at line 525 of file html.cpp.
References GetStrToETag(), and MoveToBTagOrEof().
{ MoveToBTagOrEof(TagNm); return GetStrToETag(TagNm, TxtOnlyP); }
TStr THtmlLx::GetStrToBTag | ( | const TStr & | TagNm, |
const bool & | TxtOnlyP = false |
||
) |
Definition at line 462 of file html.cpp.
References ChA, forever, GetSym(), hsyBTag, hsyEof, hsyETag, PreSpaces, Sym, and UcChA.
{ TChA OutChA; forever { GetSym(); if ((Sym==hsyEof)||((Sym==hsyBTag)&&(UcChA==TagNm))){ break; } else { if (PreSpaces>0){OutChA+=' ';} if ((TxtOnlyP&&(Sym!=hsyBTag)&&(Sym!=hsyETag))||(!TxtOnlyP)){ OutChA+=ChA;} } } return OutChA; }
TStr THtmlLx::GetStrToBTag | ( | const TStr & | TagNm, |
const TStr & | ArgNm, | ||
const TStr & | ArgVal, | ||
const bool & | TxtOnlyP = false |
||
) |
Definition at line 477 of file html.cpp.
References ChA, forever, GetArg(), GetSym(), hsyBTag, hsyEof, hsyETag, IsArg(), PreSpaces, Sym, and UcChA.
{ TChA OutChA; forever { GetSym(); if ((Sym==hsyEof)||((Sym==hsyBTag)&&(UcChA==TagNm)&& (IsArg(ArgNm))&&(GetArg(ArgNm)==ArgVal))){ break; } else { if (PreSpaces>0){OutChA+=' ';} if ((TxtOnlyP&&(Sym!=hsyBTag)&&(Sym!=hsyETag))||(!TxtOnlyP)){ OutChA+=ChA;} } } return OutChA; }
TStr THtmlLx::GetStrToETag | ( | const TStr & | TagNm, |
const bool & | TxtOnlyP = false |
||
) |
Definition at line 494 of file html.cpp.
References ChA, forever, GetSym(), hsyBTag, hsyEof, hsyETag, PreSpaces, Sym, and UcChA.
Referenced by GetStrInTag().
{ TChA OutChA; forever { GetSym(); if ((Sym==hsyEof)||((Sym==hsyETag)&&(UcChA==TagNm))){ break; } else { if (PreSpaces>0){OutChA+=' ';} if ((TxtOnlyP&&(Sym!=hsyBTag)&&(Sym!=hsyETag))||(!TxtOnlyP)){ OutChA+=ChA;} } } return OutChA; }
TStr THtmlLx::GetStrToETag2 | ( | const TStr & | TagNm1, |
const TStr & | TagNm2, | ||
const bool & | TxtOnlyP = false |
||
) |
Definition at line 509 of file html.cpp.
References ChA, forever, GetSym(), hsyBTag, hsyEof, hsyETag, PreSpaces, Sym, and UcChA.
{ TChA OutChA; forever { GetSym(); if ((Sym==hsyEof)||((Sym==hsyETag)&&(UcChA==TagNm1))||((Sym==hsyETag)&&(UcChA==TagNm2))){ break; } else { if (PreSpaces>0){OutChA+=' ';} if ((TxtOnlyP&&(Sym!=hsyBTag)&&(Sym!=hsyETag))||(!TxtOnlyP)){ OutChA+=ChA;} } } return OutChA; }
Definition at line 277 of file html.cpp.
References TChA::AddCh(), ArgNmValV, Ch, ChA, ChDef, ChX, TChA::Clr(), TVec< TVal, TSizeTy >::Clr(), TChA::Empty(), EscCh, forever, GetCh(), THtmlLxChDef::GetChTy(), GetEscCh(), GetMetaTag(), GetTag(), THtmlLxChDef::GetUc(), hlctAlpha, hlctEof, hlctLTag, hlctNum, hlctRTag, hlctSym, hsyEof, hsyNum, hsySSym, hsyStr, hsyUndef, THtmlLxChDef::IsAlNum(), THtmlLxChDef::IsAlpha(), THtmlLxChDef::IsNum(), THtmlLxChDef::IsSpace(), TChA::LastCh(), TChA::Pop(), PreSpaceChA, PreSpaces, PutCh(), Sym, SymBChX, SymChA, SymEChX, and UcChA.
Referenced by GetHRefBeforeStr(), GetNoTag(), THtmlDoc::GetRedirHtmlDocStr(), GetStrToBTag(), GetStrToETag(), GetStrToETag2(), GetTextOnlyStrToEof(), GetTokStrV(), THtmlDoc::GetTxtLnDoc(), IsGetBTag(), IsGetETag(), MoveToBTag2OrEof(), MoveToBTag3OrEof(), MoveToBTagArg2OrEof(), MoveToBTagArgOrEof(), MoveToBTagOrEof(), MoveToBTagOrETagOrEof(), MoveToETagOrEof(), MoveToStrOrEof(), THtmlDoc::SaveHtmlToXml(), and THtmlDoc::THtmlDoc().
{ // prepare symbol descriptions ChA.Clr(); UcChA.Clr(); PreSpaces=0; PreSpaceChA.Clr(); ArgNmValV.Clr(); // skip white-space while (ChDef.IsSpace(Ch)){ if (ChX>0){PreSpaceChA+=Ch; PreSpaces++;} GetEscCh();} // parse symbol SymChA.Clr(); SymChA+=Ch; SymBChX=ChX; switch (ChDef.GetChTy(Ch)){ case hlctAlpha: Sym=hsyStr; forever{ do { ChA.AddCh(Ch); UcChA.AddCh(ChDef.GetUc(Ch)); GetEscCh(); } while (ChDef.IsAlNum(Ch)); if (Ch=='.'){ GetCh(); if (ChDef.IsAlNum(Ch)){ChA.AddCh('.'); UcChA.AddCh('.');} else {PutCh(Ch); Ch='.'; break;} } else {break;} } break; case hlctNum: Sym=hsyNum; forever{ do { ChA.AddCh(Ch); UcChA.AddCh(Ch); GetEscCh(); } while (ChDef.IsNum(Ch)); if (Ch=='.'){ GetCh(); if (ChDef.IsAlNum(Ch)){ChA.AddCh('.'); UcChA.AddCh('.');} else {PutCh(Ch); Ch='.'; break;} } else if (ChDef.IsAlpha(Ch)){ Sym=hsyStr; } else { break; } } break; case hlctSym: Sym=hsySSym; ChA.AddCh(Ch); UcChA.AddCh(Ch); GetEscCh(); if ((ChA.LastCh()=='.')&&(ChDef.IsAlNum(Ch))){ Sym=hsyStr; do { ChA.AddCh(Ch); UcChA.AddCh(ChDef.GetUc(Ch)); GetEscCh(); } while (ChDef.IsAlNum(Ch)); } break; case hlctLTag: if (EscCh){ Sym=hsySSym; ChA.AddCh(Ch); UcChA.AddCh(Ch); GetEscCh(); } else { GetCh(); if (Ch=='!'){GetCh(); GetMetaTag();} else {GetTag();} } break; case hlctRTag: if (EscCh){ Sym=hsySSym; ChA.AddCh(Ch); UcChA.AddCh(Ch); GetEscCh(); } else { Sym=hsySSym; ChA.AddCh(Ch); UcChA.AddCh(Ch); GetEscCh(); } break; case hlctEof: Sym=hsyEof; break; default: Sym=hsyUndef; GetEscCh(); } // set symbol last-character-position SymEChX=ChX-1; // delete last character if (!SymChA.Empty()){SymChA.Pop();} // return symbol return Sym; }
TStr THtmlLx::GetSymStr | ( | const THtmlLxSym & | Sym | ) | [static] |
Definition at line 553 of file html.cpp.
References Fail, hsyBTag, hsyEof, hsyETag, hsyMTag, hsyNum, hsySSym, hsyStr, hsyUndef, and hsyUrl.
Referenced by THtmlTok::SaveTxt().
{ switch (Sym){ case hsyUndef: return "Undef"; case hsyStr: return "Str"; case hsyNum: return "Num"; case hsySSym: return "SSym"; case hsyUrl: return "Url"; case hsyBTag: return "BTag"; case hsyETag: return "ETag"; case hsyMTag: return "MTag"; case hsyEof: return "Eof"; default: Fail; return TStr(); } }
void THtmlLx::GetTag | ( | ) | [private] |
Definition at line 236 of file html.cpp.
References TVec< TVal, TSizeTy >::Add(), TChA::AddCh(), ArgNm, ArgNmValV, ArgVal, Ch, ChA, ChDef, TChA::Clr(), DoParseArg, TCh::EofCh, GetCh(), GetEscCh(), THtmlLxChDef::GetUc(), hsyBTag, hsyETag, THtmlLxChDef::IsAlNum(), THtmlLxChDef::IsAlpha(), THtmlLxChDef::IsEoln(), THtmlLxChDef::IsWs(), Sym, and UcChA.
Referenced by GetSym().
{ if (Ch=='/'){Sym=hsyETag; GetCh();} else {Sym=hsyBTag;} UcChA.AddCh('<'); while (ChDef.IsAlNum(Ch)||(Ch==':')){ UcChA.AddCh(ChDef.GetUc(Ch)); GetCh();} UcChA.AddCh('>'); ChA=UcChA; if (DoParseArg){ while ((Ch!='>')&&(Ch!=TCh::EofCh)){ while ((!ChDef.IsAlpha(Ch))&&(Ch!='>')&&(Ch!=TCh::EofCh)){GetCh();} if (ChDef.IsAlpha(Ch)){ ArgNm.Clr(); ArgVal.Clr(); while (ChDef.IsAlNum(Ch)||(Ch=='-')){ArgNm.AddCh(ChDef.GetUc(Ch)); GetCh();} while (ChDef.IsWs(Ch)){GetCh();} if (Ch=='='){ GetCh(); while (ChDef.IsWs(Ch)){GetCh();} if (Ch=='"'){ GetCh(); while ((Ch!=TCh::EofCh)&&(Ch!='"')&&(Ch!='>')){ if (!ChDef.IsEoln(Ch)){ArgVal.AddCh(Ch);} GetCh();} if (Ch=='"'){GetCh();} } else if (Ch=='\''){ GetCh(); while ((Ch!=TCh::EofCh)&&(Ch!='\'')&&(Ch!='>')){ if (!ChDef.IsEoln(Ch)){ArgVal.AddCh(Ch);} GetCh();} if (Ch=='\''){GetCh();} } else { while ((!ChDef.IsWs(Ch))&&(Ch!='>')&&(Ch!=TCh::EofCh)){ ArgVal.AddCh(Ch); GetCh();} } ArgNmValV.Add(TStrKd(ArgNm, ArgVal)); } } } } else { while ((Ch!='>')&&(Ch!=TCh::EofCh)){GetCh();} } if (Ch!=TCh::EofCh){GetEscCh();} }
Definition at line 447 of file html.cpp.
References ChA, forever, GetSym(), hsyBTag, hsyEof, hsyETag, PreSpaces, and Sym.
{ TChA OutChA; forever { GetSym(); if (Sym==hsyEof){ break; } else { if (PreSpaces>0){OutChA+=' ';} if ((Sym!=hsyBTag)&&(Sym!=hsyETag)){ OutChA+=ChA;} } } return OutChA; }
PHtmlTok THtmlLx::GetTok | ( | const bool & | DoUc = true | ) |
Definition at line 353 of file html.cpp.
References ArgNmValV, ChA, Sym, and UcChA.
Referenced by THtmlDoc::GetTxtLnDoc(), THtmlDoc::SaveHtmlToXml(), and THtmlDoc::THtmlDoc().
{ if (DoUc){return PHtmlTok(new THtmlTok(Sym, UcChA, ArgNmValV));} else {return PHtmlTok(new THtmlTok(Sym, ChA, ArgNmValV));} }
void THtmlLx::GetTokStrV | ( | const TStr & | Str, |
TStrV & | TokStrV | ||
) | [static] |
Definition at line 595 of file html.cpp.
References TVec< TVal, TSizeTy >::Add(), ChA, TVec< TVal, TSizeTy >::Clr(), GetSym(), hsyEof, TStrIn::New(), SIn, and Sym.
{ PSIn SIn=TStrIn::New(Str); THtmlLx Lx(SIn); Lx.GetSym(); TokStrV.Clr(); while (Lx.Sym!=hsyEof){ TokStrV.Add(Lx.ChA); Lx.GetSym(); } }
bool THtmlLx::IsArg | ( | const TStr & | ArgNm | ) | const [inline] |
Definition at line 138 of file html.h.
References ArgNmValV, and TVec< TVal, TSizeTy >::IsIn().
Referenced by THtmlDoc::_IsTagRedir(), GetStrToBTag(), MoveToBTagArg2OrEof(), MoveToBTagArgOrEof(), and MoveToBTagOrEof().
bool THtmlLx::IsGetBTag | ( | const TStr & | TagNm | ) |
bool THtmlLx::IsGetETag | ( | const TStr & | TagNm | ) |
void THtmlLx::MoveToBTag2OrEof | ( | const TStr & | TagNm1, |
const TStr & | TagNm2 | ||
) |
void THtmlLx::MoveToBTag3OrEof | ( | const TStr & | TagNm1, |
const TStr & | TagNm2, | ||
const TStr & | TagNm3 | ||
) |
void THtmlLx::MoveToBTagArg2OrEof | ( | const TStr & | TagNm, |
const TStr & | ArgNm1, | ||
const TStr & | ArgVal1, | ||
const TStr & | ArgNm2, | ||
const TStr & | ArgVal2, | ||
const bool & | AndOpP = true |
||
) |
Definition at line 410 of file html.cpp.
References forever, GetArg(), GetSym(), hsyBTag, hsyEof, IsArg(), Sym, and UcChA.
{ forever { GetSym(); if (Sym==hsyEof){break;} if (AndOpP){ if ((Sym==hsyBTag)&&(UcChA==TagNm)&& (IsArg(ArgNm1))&&(GetArg(ArgNm1)==ArgVal1)&& (IsArg(ArgNm2))&&(GetArg(ArgNm2)==ArgVal2)){break;} } else { if ((Sym==hsyBTag)&&(UcChA==TagNm)&& (((IsArg(ArgNm1))&&(GetArg(ArgNm1)==ArgVal1))|| ((IsArg(ArgNm2))&&(GetArg(ArgNm2)==ArgVal2)))){break;} } } }
void THtmlLx::MoveToBTagArgOrEof | ( | const TStr & | TagNm, |
const TStr & | ArgNm, | ||
const TStr & | ArgVal | ||
) |
Definition at line 400 of file html.cpp.
References forever, GetArg(), GetSym(), hsyBTag, hsyEof, IsArg(), Sym, and UcChA.
{ forever { GetSym(); if (Sym==hsyEof){break;} if ((Sym==hsyBTag)&&(UcChA==TagNm)&& (IsArg(ArgNm))&&(GetArg(ArgNm)==ArgVal)){break;} } }
void THtmlLx::MoveToBTagOrEof | ( | const TStr & | TagNm | ) |
void THtmlLx::MoveToBTagOrEof | ( | const TStr & | TagNm1, |
const TStr & | ArgNm1, | ||
const TStr & | ArgVal1, | ||
const TStr & | TagNm2, | ||
const TStr & | ArgNm2, | ||
const TStr & | ArgVal2 | ||
) |
Definition at line 428 of file html.cpp.
References forever, GetArg(), GetSym(), hsyBTag, hsyEof, IsArg(), Sym, and UcChA.
{ forever { GetSym(); if (Sym==hsyEof){break;} if ((Sym==hsyBTag)&&(UcChA==TagNm1)&& (IsArg(ArgNm1))&&(GetArg(ArgNm1)==ArgVal1)){break;} if ((Sym==hsyBTag)&&(UcChA==TagNm2)&& (IsArg(ArgNm2))&&(GetArg(ArgNm2)==ArgVal2)){break;} } }
void THtmlLx::MoveToBTagOrETagOrEof | ( | const TStr & | BTagNm, |
const TStr & | ETagNm | ||
) |
void THtmlLx::MoveToETagOrEof | ( | const TStr & | TagNm | ) |
void THtmlLx::MoveToStrOrEof | ( | const TStr & | Str | ) |
void THtmlLx::PutArg | ( | const TStr & | ArgNm, |
const TStr & | ArgVal | ||
) | [inline] |
Definition at line 142 of file html.h.
References TVec< TVal, TSizeTy >::Add(), ArgNmValV, and TVec< TVal, TSizeTy >::SearchForw().
Referenced by THtmlDoc::_IsTagRedir().
{ int ArgN=ArgNmValV.SearchForw(TStrKd(ArgNm)); if (ArgN==-1){ArgNmValV.Add(TStrKd(ArgNm, ArgVal));} else {ArgNmValV[ArgN]=TStrKd(ArgNm, ArgVal);}}
void THtmlLx::PutCh | ( | const char & | _Ch | ) | [inline] |
Definition at line 126 of file html.h.
References Ch, ChStack, ChX, TChA::Empty(), TChA::Pop(), TChA::Push(), and SymChA.
Referenced by GetEscCh(), GetSym(), and PutStr().
void THtmlLx::PutStr | ( | const TStr & | Str | ) | [inline] |
Definition at line 128 of file html.h.
References TStr::Len(), and PutCh().
Referenced by GetEscCh().
TChA THtmlLx::ArgNm [private] |
TChA THtmlLx::ArgVal [private] |
char THtmlLx::Ch [private] |
Definition at line 89 of file html.h.
Referenced by GetAsciiStr(), GetCh(), GetEscapedStr(), GetEscCh(), GetMetaTag(), GetSym(), GetTag(), and PutCh().
Definition at line 109 of file html.h.
Referenced by THtmlDoc::_IsTagRedir(), GetFullBTagStr(), GetHRefBeforeStr(), GetNoTag(), GetStrToBTag(), GetStrToETag(), GetStrToETag2(), GetSym(), GetTag(), GetTextOnlyStrToEof(), GetTok(), GetTokStrV(), THtmlDoc::GetTxtLnDoc(), IsGetBTag(), IsGetETag(), MoveToStrOrEof(), and THtmlDoc::SaveHtmlToXml().
THtmlLxChDef THtmlLx::ChDef [static, private] |
Definition at line 84 of file html.h.
Referenced by GetEscCh(), GetSym(), and GetTag().
TChA THtmlLx::ChStack [private] |
int THtmlLx::ChX [private] |
bool THtmlLx::DoParseArg [private] |
bool THtmlLx::EscCh [private] |
Definition at line 91 of file html.h.
Referenced by GetEscCh(), and GetSym().
TChA THtmlLx::EscChA [private] |
Definition at line 92 of file html.h.
Referenced by GetEscCh().
Definition at line 113 of file html.h.
Referenced by THtmlDoc::GetRedirHtmlDocStr(), and GetSym().
Definition at line 112 of file html.h.
Referenced by GetNoTag(), GetPreSpaceStr(), GetStrToBTag(), GetStrToETag(), GetStrToETag2(), GetSym(), GetTextOnlyStrToEof(), and THtmlDoc::GetTxtLnDoc().
TSIn& THtmlLx::RSIn [private] |
PSIn THtmlLx::SIn [private] |
Definition at line 85 of file html.h.
Referenced by GetNoTag(), and GetTokStrV().
Definition at line 107 of file html.h.
Referenced by THtmlDoc::_IsTagRedir(), GetFullBTagStr(), GetHRefBeforeStr(), GetMetaTag(), GetNoTag(), THtmlDoc::GetRedirHtmlDocStr(), GetStrToBTag(), GetStrToETag(), GetStrToETag2(), GetSym(), GetTag(), GetTextOnlyStrToEof(), GetTok(), GetTokStrV(), THtmlDoc::GetTxtLnDoc(), MoveToBTag2OrEof(), MoveToBTag3OrEof(), MoveToBTagArg2OrEof(), MoveToBTagArgOrEof(), MoveToBTagOrEof(), MoveToBTagOrETagOrEof(), MoveToETagOrEof(), MoveToStrOrEof(), THtmlDoc::SaveHtmlToXml(), and THtmlDoc::THtmlDoc().
int THtmlLx::SymBChX |
int THtmlLx::SymEChX |
Definition at line 110 of file html.h.
Referenced by GetHRefBeforeStr(), GetStrToBTag(), GetStrToETag(), GetStrToETag2(), GetSym(), GetTag(), GetTok(), MoveToBTag2OrEof(), MoveToBTag3OrEof(), MoveToBTagArg2OrEof(), MoveToBTagArgOrEof(), MoveToBTagOrEof(), MoveToBTagOrETagOrEof(), MoveToETagOrEof(), and THtmlDoc::THtmlDoc().