Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PURL::AsString ( UrlFormat  fmt = FullURL ) const

Convert the URL object into its string representation. The parameter indicates whether a full or partial representation os to be produced.

String representation of the URL.
fmtThe type of string to be returned.

Definition at line 964 of file http.cxx.

References PString::Empty(), FullURL, and PString::IsEmpty().

Referenced by PHTTPClient::GetDocument().

  if (fmt == FullURL)
    return urlString;

  if (scheme.IsEmpty())
    return PString::Empty();

  //const schemeStruct * schemeInfo = GetSchemeInfo(scheme);
  //if (schemeInfo == NULL)
  //  schemeInfo = &SchemeTable[PARRAYSIZE(SchemeTable)-1];
  const PURLScheme * schemeInfo = PFactory<PURLScheme>::CreateInstance(scheme);
  if (schemeInfo == NULL)
    schemeInfo = PFactory<PURLScheme>::CreateInstance(DEFAULT_SCHEME);

  return schemeInfo->AsString(fmt, *this);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index