SNAP Library, User Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
url.h File Reference

Go to the source code of this file.

Typedefs

typedef TPair< TInt, PUrl > TIdUrlPr
typedef TQQueue< TIdUrlPrTIdUrlPrQ
typedef THash< TInt, PUrl > TIdToUrlH

Enumerations

enum  TUrlScheme { usUndef, usHttp, usOther }

Functions

void GetAbs (const TStr &AbsUrlStr)
void GetAbsFromBase (const TStr &RelUrlStr, const TStr &BaseUrlStr)
 UndefDefaultCopyAssign (TUrl)
 TUrl (const TStr &_RelUrlStr, const TStr &_BaseUrlStr=TStr())
static PUrl New (const TStr &RelUrlStr, const TStr &BaseUrlStr=TStr())
 ~TUrl ()
 TUrl (TSIn &)
static PUrl Load (TSIn &)
void Save (TSOut &)
bool IsOk (const TUrlScheme _Scheme=usUndef) const
TUrlScheme GetScheme ()
TStr GetUrlStr () const
TStr GetRelUrlStr () const
bool IsBaseUrl ()
TStr GetBaseUrlStr () const
TStr GetSchemeNm () const
TStr GetHostNm () const
TStr GetDmNm (const int &MxDmSegs=-1) const
bool IsPortOk () const
TStr GetPortStr () const
int GetPortN () const
TStr GetPathStr () const
int GetPathSegs () const
TStr GetPathSeg (const int &PathSegN) const
TStr GetSearchStr () const
TStr GetFragIdStr () const
bool IsIpNum () const
void PutIpNum (const TStr &_IpNum)
TStr GetIpNum () const
TStr GetIpNumOrHostNm () const
bool IsDefFinalUrl () const
TStr GetFinalUrlStr () const
TStr GetAsFinalUrlStr () const
TStr GetFinalHostNm () const
TStr GetAsFinalHostNm () const
void DefUrlAsFinal ()
void DefFinalUrl (const TStr &_FinalHostNm)
void PutHttpRqStr (const TStr &_HttpRqStr)
TStr GetHttpRqStr () const
bool IsHttpRqStr () const
void ChangeHttpRqStr (const TStr &SrcStr, const TStr &DstStr)
bool IsInHost (const TStr &_HostNm) const
bool IsInPath (const TStr &_PathStr) const
void ToLcPath ()
static bool IsAbs (const TStr &UrlStr)
static bool IsScript (const TStr &UrlStr)
static bool IsSite (const TStr &UrlStr)
static PUrl GetUrlFromShortcut (const TStr &ShortcutUrlStr, const TStr &DfHostNmPrefix, const TStr &DfHostNmSufix)
static TStr GetUrlSearchStr (const TStr &Str)
static TStr DecodeUrlStr (const TStr &UrlStr)
static TStr GetDocStrFromUrlStr (const TStr &UrlStr, const int &Copies=1)
static TStr GetTopDownDocNm (const TStr &UrlStr, const int &MxLen=-1, const bool &HostOnlyP=false)
 TUrlEnv ()
 TUrlEnv (const TUrlEnv &UrlEnv)
static PUrlEnv New ()
static PUrlEnv New (const TStr &BaseUrlStr, const TStr &KeyNm1=TStr(), const TStr &ValStr1=TStr(), const TStr &KeyNm2=TStr(), const TStr &ValStr2=TStr(), const TStr &KeyNm3=TStr(), const TStr &ValStr3=TStr(), const TStr &KeyNm4=TStr(), const TStr &ValStr4=TStr())
 ~TUrlEnv ()
 TUrlEnv (TSIn &SIn)
TUrlEnvoperator= (const TUrlEnv &Env)
void PutBaseUrlStr (const TStr &_BaseUrlStr)
void AddKeyVal (const TStr &KeyNm, const TStr &ValStr)
void AddToKeyVal (const TStr &KeyNm, const TStr &ValStr)
bool Empty () const
int GetKeys () const
bool IsKey (const TStr &KeyNm) const
int GetKeyN (const TStr &KeyNm) const
TStr GetKeyNm (const int &KeyN) const
int GetVals (const int &KeyN) const
int GetVals (const TStr &KeyNm) const
TStr GetVal (const int &KeyN, const int &ValN=0) const
TStr GetVal (const TStr &KeyNm, const int &ValN=0, const TStr &DfVal="") const
TStr GetFullUrlStr () const
static PUrlEnv MkClone (const PUrlEnv &UrlEnv)

Variables

static ClassTPV(TUrl, PUrl,
TUrlV) private const TStr 
UrlHttpAbsPrefixStr = "http://"
TUrlScheme Scheme
TStr UrlStr
TStr RelUrlStr
TStr BaseUrlStr
TStr SchemeNm
TStr HostNm
TStr PortStr
TStr PathStr
TStr SearchStr
TStr FragIdStr
int PortN
TStrV PathSegV
TStr IpNum
TStr FinalUrlStr
TStr FinalHostNm
TStr HttpRqStr
ClassTP(TUrlEnv, PUrlEnv)
private TStrV 
KeyNmV
TStrStrVH KeyNmToValH

Typedef Documentation

typedef THash<TInt, PUrl> TIdToUrlH
typedef TPair<TInt, PUrl> TIdUrlPr

Enumeration Type Documentation

enum TUrlScheme
Enumerator:
usUndef 
usHttp 
usOther 

Function Documentation

void AddKeyVal ( const TStr KeyNm,
const TStr ValStr 
)
void AddToKeyVal ( const TStr KeyNm,
const TStr ValStr 
)
void ChangeHttpRqStr ( const TStr SrcStr,
const TStr DstStr 
)
TStr TUrl::DecodeUrlStr ( const TStr UrlStr) [static]
void TUrl::DefFinalUrl ( const TStr _FinalHostNm)
void DefUrlAsFinal ( )
bool Empty ( ) const
void TUrl::GetAbs ( const TStr AbsUrlStr)
void TUrl::GetAbsFromBase ( const TStr RelUrlStr,
const TStr BaseUrlStr 
)
TStr GetBaseUrlStr ( ) const
TStr TUrl::GetDmNm ( const int &  MxDmSegs = -1) const
TStr TUrl::GetDocStrFromUrlStr ( const TStr UrlStr,
const int &  Copies = 1 
) [static]
TStr GetFinalHostNm ( ) const
TStr GetFinalUrlStr ( ) const
TStr GetFragIdStr ( ) const
TStr GetHostNm ( ) const
TStr GetHttpRqStr ( ) const
TStr GetIpNum ( ) const
int GetKeyN ( const TStr KeyNm) const
TStr GetKeyNm ( const int &  KeyN) const
int GetKeys ( ) const
TStr GetPathSeg ( const int &  PathSegN) const
int GetPathSegs ( ) const
TStr GetPathStr ( ) const
int GetPortN ( ) const
TStr GetPortStr ( ) const
TStr GetRelUrlStr ( ) const
TStr GetSchemeNm ( ) const
TStr GetSearchStr ( ) const
TStr TUrl::GetTopDownDocNm ( const TStr UrlStr,
const int &  MxLen = -1,
const bool &  HostOnlyP = false 
) [static]
PUrl TUrl::GetUrlFromShortcut ( const TStr ShortcutUrlStr,
const TStr DfHostNmPrefix,
const TStr DfHostNmSufix 
) [static]
TStr TUrl::GetUrlSearchStr ( const TStr Str) [static]
TStr GetUrlStr ( ) const
TStr GetVal ( const int &  KeyN,
const int &  ValN = 0 
) const
TStr GetVal ( const TStr KeyNm,
const int &  ValN = 0,
const TStr DfVal = "" 
) const
int GetVals ( const int &  KeyN) const
int GetVals ( const TStr KeyNm) const
bool TUrl::IsAbs ( const TStr UrlStr) [static]
bool IsBaseUrl ( )
bool IsDefFinalUrl ( ) const
bool IsHttpRqStr ( ) const
bool IsInHost ( const TStr _HostNm) const
bool IsInPath ( const TStr _PathStr) const
bool IsIpNum ( ) const
bool IsKey ( const TStr KeyNm) const
bool IsOk ( const TUrlScheme  _Scheme = usUndef) const
bool IsPortOk ( ) const
bool TUrl::IsScript ( const TStr UrlStr) [static]
bool TUrl::IsSite ( const TStr UrlStr) [static]
static PUrlEnv Load ( TSIn SIn) [static]
static PUrlEnv MkClone ( const PUrlEnv &  UrlEnv) [static]
static PUrl New ( const TStr RelUrlStr,
const TStr BaseUrlStr = TStr() 
) [static]
static PUrlEnv New ( ) [static]
static PUrlEnv New ( const TStr BaseUrlStr,
const TStr KeyNm1 = TStr(),
const TStr ValStr1 = TStr(),
const TStr KeyNm2 = TStr(),
const TStr ValStr2 = TStr(),
const TStr KeyNm3 = TStr(),
const TStr ValStr3 = TStr(),
const TStr KeyNm4 = TStr(),
const TStr ValStr4 = TStr() 
) [static]
TUrlEnv& operator= ( const TUrlEnv Env)
void PutBaseUrlStr ( const TStr _BaseUrlStr)
void PutHttpRqStr ( const TStr _HttpRqStr)
void PutIpNum ( const TStr _IpNum)
void Save ( TSOut SOut)
void TUrl::ToLcPath ( )
TUrl::TUrl ( const TStr _RelUrlStr,
const TStr _BaseUrlStr = TStr() 
)
TUrl ( TSIn )
TUrlEnv ( )
TUrlEnv ( const TUrlEnv UrlEnv)
TUrlEnv ( TSIn SIn)
~TUrl ( )
~TUrlEnv ( )

Variable Documentation

ClassTP (TUrlEnv, PUrlEnv) private TStrV KeyNmV
int PortN
const TStr TUrl::UrlHttpAbsPrefixStr = "http://" [static]