Beispiel #1
0
//==============================================================================
Uri Uri::createFromString(const std::string& _input)
{
  Uri uri;
  if(!uri.fromString(_input))
  {
    dtwarn << "[Uri::createFromString] Failed parsing URI '" << _input
           << "'.\n";
  }

  // We don't need to clear uri since fromString() does not set any component
  // on failure.

  return uri;
}
Beispiel #2
0
//==============================================================================
bool Uri::fromRelativeUri(const Uri& _base, const std::string& _relative,
                          bool _strict)
{
  Uri relativeUri;
  if(!relativeUri.fromString(_relative))
  {
    dtwarn << "[Uri::fromRelativeUri] Failed parsing relative URI '"
           << _relative << "'.\n";
    clear();
    return false;
  }

  return fromRelativeUri(_base, relativeUri, _strict);
}