| 
    SNAP Library 2.2, Developer Reference
    2014-03-11 19:15:55
    
   SNAP, a general purpose, high performance system for analysis and manipulation of large networks 
   | 
  
  
  
 

Public Member Functions | |
| TUrlLx (const TStr &_Str) | |
| bool | Eof () const | 
| char | GetCh () | 
| char | PeekCh () const | 
| char | GetCh (const char &Ch) | 
| TStr | GetStr (const TStr &Str) | 
| const char * | GetStr (const char *Str) | 
| bool | IsSchemeCh () const | 
| char | GetSchemeCh () | 
| bool | IsDigitCh () const | 
| char | GetDigitCh () | 
| bool | IsHSegmentCh () const | 
| char | GetHSegmentCh () | 
| TStr | GetToCh (const char &Ch=TUrlLxChDef::EofCh) | 
| TStr | GetScheme () | 
| TStr | GetHost () | 
| TStr | GetDigits () | 
| TStr | GetHostPort (TStr &HostNm, TStr &PortStr, int &PortN) | 
| TStr | GetHPath (TStrV &PathSegV) | 
| TStr | GetSearch () | 
Static Public Attributes | |
| static const TUrlLxChDef | ChDef | 
Private Attributes | |
| TChA | Bf | 
| int | BfC | 
Static Private Attributes | |
| static const char | EofCh = TUrlLxChDef::EofCh | 
| TUrlLx::TUrlLx | ( | const TStr & | _Str | ) |  [inline] | 
        
| bool TUrlLx::Eof | ( | ) |  const [inline] | 
        
| char TUrlLx::GetCh | ( | ) |  [inline] | 
        
Definition at line 85 of file url.cpp.
References Bf, BfC, Eof(), and EofCh.
Referenced by TUrl::GetAbs(), GetDigitCh(), GetHost(), GetHostPort(), GetHPath(), GetHSegmentCh(), GetScheme(), GetSchemeCh(), GetStr(), and GetToCh().


| char TUrlLx::GetCh | ( | const char & | Ch | ) |  [inline] | 
        
| char TUrlLx::GetDigitCh | ( | ) |  [inline] | 
        
Definition at line 99 of file url.cpp.
References EAssertR, GetCh(), and IsDigitCh().
Referenced by GetDigits().


| TStr TUrlLx::GetDigits | ( | ) |  [inline] | 
        
Definition at line 109 of file url.cpp.
References GetDigitCh(), and IsDigitCh().
Referenced by GetHostPort().
                  {TChA Str;
    do {Str+=GetDigitCh();} while (IsDigitCh()); return Str;}


| TStr TUrlLx::GetHost | ( | ) | 
Definition at line 119 of file url.cpp.
References ChDef, TChA::Clr(), EAssertR, GetCh(), TUrlLxChDef::IsHostCh(), PeekCh(), and TChA::ToLc().
Referenced by GetHostPort().
                    {TChA Str;
  EAssertR(ChDef.IsHostCh(PeekCh()), "");
  do {
    while (ChDef.IsHostCh(PeekCh())){Str+=GetCh();}
    if (PeekCh()=='.'){Str+=GetCh('.');}
    else if (PeekCh()=='@'){GetCh('@'); Str.Clr();} // still unexplained
  } while (ChDef.IsHostCh(PeekCh()));
  Str.ToLc();
  return Str;
}


| TStr TUrlLx::GetHostPort | ( | TStr & | HostNm, | 
| TStr & | PortStr, | ||
| int & | PortN | ||
| ) | 
Definition at line 130 of file url.cpp.
References GetCh(), GetDigits(), GetHost(), TStr::GetInt(), IsDigitCh(), and PeekCh().
Referenced by TUrl::GetAbs().
                                                               {TChA Str;
  Str+=HostNm=GetHost();
  if (PeekCh()==':'){
    Str+=GetCh(':');
    if (IsDigitCh()){Str+=PortStr=GetDigits(); PortN=PortStr.GetInt();}
  }
  return Str;
}


| TStr TUrlLx::GetHPath | ( | TStrV & | PathSegV | ) | 
Definition at line 139 of file url.cpp.
References TVec< TVal, TSizeTy >::Add(), TChA::Clr(), GetCh(), GetHSegmentCh(), IsHSegmentCh(), and PeekCh().
Referenced by TUrl::GetAbs().
                                    {TChA Str; TChA HSegStr; bool Cont;
  do {
    while (PeekCh()=='/'){GetCh('/');} // prevent multiple '/'
    HSegStr.Clr(); while (IsHSegmentCh()){HSegStr+=GetHSegmentCh();}
    Str+=HSegStr; PathSegV.Add(HSegStr);
    Cont=(PeekCh()=='/'); if (Cont){Str+=GetCh('/');}
  } while (Cont);
  return Str;
}


| char TUrlLx::GetHSegmentCh | ( | ) |  [inline] | 
        
Definition at line 101 of file url.cpp.
References EAssertR, GetCh(), and IsHSegmentCh().
Referenced by GetHPath().
{EAssertR(IsHSegmentCh(), ""); return GetCh();}


| TStr TUrlLx::GetScheme | ( | ) |  [inline] | 
        
Definition at line 105 of file url.cpp.
References GetCh(), GetSchemeCh(), IsSchemeCh(), and TChA::ToLc().
Referenced by TUrl::GetAbs().
                  {TChA Str;
    Str+=GetSchemeCh(); while (IsSchemeCh()){Str+=GetCh();}
    Str.ToLc(); return Str;}


| char TUrlLx::GetSchemeCh | ( | ) |  [inline] | 
        
Definition at line 97 of file url.cpp.
References EAssertR, GetCh(), and IsSchemeCh().
Referenced by GetScheme().
{EAssertR(IsSchemeCh(), ""); return GetCh();}


| TStr TUrlLx::GetSearch | ( | ) |  [inline] | 
        
Definition at line 113 of file url.cpp.
References GetToCh().
Referenced by TUrl::GetAbs().
{return GetToCh('#');}


| TStr TUrlLx::GetStr | ( | const TStr & | Str | ) |  [inline] | 
        
Definition at line 88 of file url.cpp.
References GetCh(), and TStr::Len().
Referenced by TUrl::GetAbs().


| const char* TUrlLx::GetStr | ( | const char * | Str | ) |  [inline] | 
        
| TStr TUrlLx::GetToCh | ( | const char & | Ch = TUrlLxChDef::EofCh | ) |  [inline] | 
        
| bool TUrlLx::IsDigitCh | ( | ) |  const [inline] | 
        
Definition at line 98 of file url.cpp.
References ChDef, TUrlLxChDef::IsDigitCh(), and PeekCh().
Referenced by GetDigitCh(), GetDigits(), and GetHostPort().


| bool TUrlLx::IsHSegmentCh | ( | ) |  const [inline] | 
        
Definition at line 100 of file url.cpp.
References ChDef, TUrlLxChDef::IsHSegmentCh(), and PeekCh().
Referenced by GetHPath(), and GetHSegmentCh().
{return ChDef.IsHSegmentCh(PeekCh());}


| bool TUrlLx::IsSchemeCh | ( | ) |  const [inline] | 
        
Definition at line 96 of file url.cpp.
References ChDef, TUrlLxChDef::IsSchemeCh(), and PeekCh().
Referenced by GetScheme(), and GetSchemeCh().
{return ChDef.IsSchemeCh(PeekCh());}


| char TUrlLx::PeekCh | ( | ) |  const [inline] | 
        
Definition at line 86 of file url.cpp.
References Bf, BfC, Eof(), and EofCh.
Referenced by TUrl::GetAbs(), GetHost(), GetHostPort(), GetHPath(), GetToCh(), IsDigitCh(), IsHSegmentCh(), and IsSchemeCh().


TChA TUrlLx::Bf [private] | 
        
int TUrlLx::BfC [private] | 
        
const TUrlLxChDef TUrlLx::ChDef [static] | 
        
Definition at line 82 of file url.cpp.
Referenced by GetHost(), IsDigitCh(), IsHSegmentCh(), and IsSchemeCh().
const char TUrlLx::EofCh = TUrlLxChDef::EofCh [static, private] |