SNAP Library 2.0, User Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
THttpChDef Class Reference

List of all members.

Public Member Functions

 THttpChDef ()
THttpChDefoperator= (const THttpChDef &)
int GetChTy (const char &Ch)
bool IsAlpha (const char &Ch)
bool IsDigit (const char &Ch)
bool IsCtl (const char &Ch)
bool IsLws (const char &Ch)
bool IsText (const char &Ch)
bool IsSpec (const char &Ch)
bool IsCr (const char &Ch)
bool IsLf (const char &Ch)
bool IsSp (const char &Ch)
bool IsHt (const char &Ch)
bool IsDQuote (const char &Ch)
char GetLcCh (const char &Ch)
TStr GetLcStr (const TStr &Str)

Private Member Functions

void SetLcCh (const TStr &Str)
void SetChTy (const THttpChTy &ChTy, const char &Ch)
void SetChTy (const THttpChTy &ChTy, const TStr &Str)

Private Attributes

TIntV ChTyV
TChV LcChV

Detailed Description

Definition at line 94 of file http.cpp.


Constructor & Destructor Documentation

Definition at line 134 of file http.cpp.

                      :
  ChTyV(TCh::Vals), LcChV(TCh::Vals){

  // Character-Types
  ChTyV.PutAll(TInt(hpctUndef));
  SetChTy(hpctAlpha, "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
  SetChTy(hpctAlpha, "abcdefghijklmnopqrstuvwxyz");
  SetChTy(hpctDigit, "0123456789");
  for (char Ch=0; Ch<=31; Ch++){SetChTy(hpctCtl, Ch);}
  SetChTy(hpctCtl, 127);
  SetChTy(hpctSpec, "()<>@,;:\\\"/[]?={}"); // +char(9)+char(32)

  // Lower-Case
  {for (int Ch=TCh::Mn; Ch<=TCh::Mx; Ch++){LcChV[Ch-TCh::Mn]=TCh(char(Ch));}}
  SetLcCh("aA"); SetLcCh("bB"); SetLcCh("cC"); SetLcCh("dD"); SetLcCh("eE");
  SetLcCh("fF"); SetLcCh("gG"); SetLcCh("hH"); SetLcCh("iI"); SetLcCh("jJ");
  SetLcCh("kK"); SetLcCh("lL"); SetLcCh("mM"); SetLcCh("nN"); SetLcCh("oO");
  SetLcCh("pP"); SetLcCh("qQ"); SetLcCh("rR"); SetLcCh("sS"); SetLcCh("tT");
  SetLcCh("uU"); SetLcCh("vV"); SetLcCh("wW"); SetLcCh("xX"); SetLcCh("yY");
  SetLcCh("zZ");
}

Member Function Documentation

int THttpChDef::GetChTy ( const char &  Ch) [inline]

Definition at line 106 of file http.cpp.

{return ChTyV[Ch-TCh::Mn];}
char THttpChDef::GetLcCh ( const char &  Ch) [inline]

Definition at line 121 of file http.cpp.

{return LcChV[Ch-TCh::Mn];}
TStr THttpChDef::GetLcStr ( const TStr Str)

Definition at line 156 of file http.cpp.

                                        {
  TChA LcStr;
  for (int ChN=0; ChN<Str.Len(); ChN++){LcStr+=GetLcCh(Str[ChN]);}
  return LcStr;
}
bool THttpChDef::IsAlpha ( const char &  Ch) [inline]

Definition at line 107 of file http.cpp.

{return ChTyV[Ch-TCh::Mn]==int(hpctAlpha);}
bool THttpChDef::IsCr ( const char &  Ch) [inline]

Definition at line 115 of file http.cpp.

{return Ch==13;}
bool THttpChDef::IsCtl ( const char &  Ch) [inline]

Definition at line 109 of file http.cpp.

{return ChTyV[Ch-TCh::Mn]==int(hpctCtl);}
bool THttpChDef::IsDigit ( const char &  Ch) [inline]

Definition at line 108 of file http.cpp.

{return ChTyV[Ch-TCh::Mn]==int(hpctDigit);}
bool THttpChDef::IsDQuote ( const char &  Ch) [inline]

Definition at line 119 of file http.cpp.

{return Ch=='"';}
bool THttpChDef::IsHt ( const char &  Ch) [inline]

Definition at line 118 of file http.cpp.

{return Ch==9;}
bool THttpChDef::IsLf ( const char &  Ch) [inline]

Definition at line 116 of file http.cpp.

{return Ch==10;}
bool THttpChDef::IsLws ( const char &  Ch) [inline]

Definition at line 110 of file http.cpp.

                            {
    return (Ch==' ')||(Ch==TCh::TabCh)||(Ch==TCh::CrCh)||(Ch==TCh::LfCh);}
bool THttpChDef::IsSp ( const char &  Ch) [inline]

Definition at line 117 of file http.cpp.

{return Ch==32;}
bool THttpChDef::IsSpec ( const char &  Ch) [inline]

Definition at line 113 of file http.cpp.

                             {
    return (ChTyV[Ch-TCh::Mn]==int(hpctSpec))||(Ch==9)||(Ch==32);}
bool THttpChDef::IsText ( const char &  Ch) [inline]

Definition at line 112 of file http.cpp.

{return !IsCtl(Ch)||IsLws(Ch);}
THttpChDef& THttpChDef::operator= ( const THttpChDef ) [inline]

Definition at line 104 of file http.cpp.

{Fail; return *this;}
void THttpChDef::SetChTy ( const THttpChTy ChTy,
const char &  Ch 
) [private]

Definition at line 125 of file http.cpp.

                                                             {
  IAssert(ChTyV[Ch-TCh::Mn]==int(hpctUndef)); ChTyV[Ch-TCh::Mn]=TInt(ChTy);}
void THttpChDef::SetChTy ( const THttpChTy ChTy,
const TStr Str 
) [private]

Definition at line 128 of file http.cpp.

                                                              {
  for (int ChN=0; ChN<Str.Len(); ChN++){SetChTy(ChTy, Str[ChN]);}}
void THttpChDef::SetLcCh ( const TStr Str) [private]

Definition at line 131 of file http.cpp.

                                       {
  for (int ChN=1; ChN<Str.Len(); ChN++){LcChV[Str[ChN]-TCh::Mn]=TCh(Str[0]);}}

Member Data Documentation

Definition at line 96 of file http.cpp.

Definition at line 97 of file http.cpp.


The documentation for this class was generated from the following file: