#include <URL.h>
Definition at line 42 of file URL.h.
std::string | url_ |
std::string | proto_ |
std::string | host_ |
u_int16_t | port_ |
std::string | path_ |
urlerr_t | err_ |
const char * | c_str () const |
Wrappers around some basic std::string accessors to simplify things. | |
const char * | data () const |
size_t | length () const |
urlerr_t | parse_internal () |
Public Member Functions | |
URL () | |
Default constructor. | |
URL (const std::string &url) | |
Construct the url from the given std::string. | |
URL (const char *url) | |
Construct the url from the given std::string. | |
URL (const URL ©) | |
Deep copy constructor. | |
void | clear () |
Clear out this url. | |
urlerr_t | parse () |
Parse the internal url_ into its constituent parts. | |
urlerr_t | parse (const std::string &url) |
Parse the internal url_ into its constituent parts. | |
void | format (const std::string &proto, const std::string &host, u_int16_t port, const std::string &path) |
Cons up this url from constituent pieces. | |
urlerr_t | status () const |
Return the result of the parse operation. | |
bool | valid () const |
Return an indication of whether or not this url is valid. |
oasys::URL::URL | ( | ) | [inline] |
oasys::URL::URL | ( | const std::string & | url | ) | [inline] |
oasys::URL::URL | ( | const char * | url | ) | [inline] |
oasys::URL::URL | ( | const URL & | copy | ) | [inline] |
void oasys::URL::clear | ( | ) | [inline] |
urlerr_t oasys::URL::parse | ( | ) |
urlerr_t oasys::URL::parse | ( | const std::string & | url | ) | [inline] |
void oasys::URL::format | ( | const std::string & | proto, | |
const std::string & | host, | |||
u_int16_t | port, | |||
const std::string & | path | |||
) |
Cons up this url from constituent pieces.
Definition at line 112 of file URL.cc.
References oasys::StringBuffer::append(), oasys::StringBuffer::appendf(), oasys::StringBuffer::data(), err_, host_, oasys::StringBuffer::length(), path_, port_, proto_, url_, and oasys::URLPARSE_OK.
urlerr_t oasys::URL::status | ( | ) | const [inline] |
bool oasys::URL::valid | ( | ) | const [inline] |
Return an indication of whether or not this url is valid.
Definition at line 124 of file URL.h.
References err_, and oasys::URLPARSE_OK.
Referenced by dtn::FileConvergenceLayer::extract_dir(), dtn::TCAScheme::validate(), and dtn::DTNScheme::validate().
const char* oasys::URL::c_str | ( | ) | const [inline] |
const char* oasys::URL::data | ( | ) | const [inline] |
urlerr_t oasys::URL::parse_internal | ( | ) | [protected] |
Definition at line 25 of file URL.cc.
References ASSERT, end, host_, path_, port_, proto_, url_, oasys::URLPARSE_BADPORT, oasys::URLPARSE_BADPROTO, oasys::URLPARSE_BADSEP, oasys::URLPARSE_NOHOST, and oasys::URLPARSE_OK.
Referenced by parse().
std::string oasys::URL::url_ |
std::string oasys::URL::proto_ |
std::string oasys::URL::host_ |
Definition at line 145 of file URL.h.
Referenced by dtn::FileConvergenceLayer::extract_dir(), format(), parse_internal(), dtn::TCAScheme::validate(), and dtn::DTNScheme::validate().
u_int16_t oasys::URL::port_ |
Definition at line 146 of file URL.h.
Referenced by dtn::FileConvergenceLayer::extract_dir(), format(), and parse_internal().
std::string oasys::URL::path_ |
Definition at line 147 of file URL.h.
Referenced by dtn::FileConvergenceLayer::extract_dir(), format(), and parse_internal().