|
| Uri () noexcept |
| デフォルトコンストラクタです。オブジェクトを初期化します。
|
|
bool | Parse (const char *str) noexcept |
| URI文字列をパースします。 [詳解]
|
|
bool | SetUri (const char *scheme, const char *userinfo, const char *host, const char *port, const char *path, const char *query, const char *fragment) noexcept |
| URIの各部分を設定します。 [詳解]
|
|
bool | ComposeString (char *buf, size_t size) const noexcept |
| URI文字列を書き出します。 [詳解]
|
|
template<size_t N> |
bool | ComposeString (char(&buf)[N]) const noexcept |
| URI文字列を書き出します。 [詳解]
|
|
bool | AddBaseUri (const Uri &relative, const Uri &base) noexcept |
| 相対パスを解決します。 [詳解]
|
|
const char * | GetScheme () const noexcept |
| URIのスキーム(http, file等)の文字列を返します。 [詳解]
|
|
const char * | GetUserInfo () const noexcept |
| 指定した URI に関連付けられているユーザー名、パスワードなどのユーザー固有の情報を取得します。 [詳解]
|
|
const char * | GetHost () const noexcept |
| ホスト名を取得します。 [詳解]
|
|
const char * | GetPort () const noexcept |
| ポート番号の文字列を取得します。 [詳解]
|
|
const char * | GetPath () const noexcept |
| パスを取得します。 [詳解]
|
|
const char * | GetQuery () const noexcept |
| クエリ文字列を取得します [詳解]
|
|
const char * | GetFragment () const noexcept |
| フラグメント文字列を取得します [詳解]
|
|
void | Reset () noexcept |
| オブジェクトを初期化(リセット)します。
|
|
|
static bool | IsReserved (int c) noexcept |
| c がRFC3986のReserved Characters であればtrue を返します。
|
|
static bool | IsUnreserved (int c) noexcept |
| c がRFC3986のUnreserved Characters であればtrue を返します。
|
|
static bool | IsHexDigit (int c) noexcept |
| 16進数の数値であればtrue を返します。
|
|
static errno_t | DecodeUriComponent (size_t *written, char *buf, size_t n, const char *first, const char *last) noexcept |
| % エンコードされた文字列をデコードします。 [詳解]
|
|
static errno_t | DecodeUriComponent (size_t *written, char *buf, size_t n, const char *s) noexcept |
| % エンコードされた文字列をデコードします。 [詳解]
|
|
static errno_t | EncodeUriComponent (size_t *written, char *buf, size_t n, const char *first, const char *last, bool fragment_mode) noexcept |
| 文字列を% エンコードします。 [詳解]
|
|
static errno_t | EncodeUriComponent (size_t *written, char *buf, size_t n, const char *s, bool fragment_mode) noexcept |
| 文字列を% エンコードします。 [詳解]
|
|
static errno_t | DecodePath (size_t *written, char *buf, size_t n, const char *s) noexcept |
| % エンコードされた文字列をデコードします。 デコードされた文字が'/'の場合にEILSEQ を返すこと以外は、DecodeUriComponent() と同じです。
|
|
static errno_t | EncodePath (size_t *written, char *buf, size_t n, const char *s) noexcept |
| 文字列を% エンコードします。'/'を% エンコードしないこと以外は、EncodeUriComponent() と同じです。
|
|
template<size_t N> |
static errno_t | DecodeUriComponent (size_t *written, char(&buf)[N], const char *s) noexcept |
| DecodeUriComponent(written, buf, N, s) を呼び出します。
|
|
template<size_t N> |
static errno_t | DecodeUriComponent (size_t *written, char(&buf)[N], const char *first, const char *last) noexcept |
| DecodeUriComponent(written, buf, N, first, last) を呼び出します。
|
|
template<size_t N> |
static errno_t | EncodeUriComponent (size_t *written, char(&buf)[N], const char *s, bool fragment_mode) noexcept |
| EncodeUriComponent(written, buf, N, s, fragment_mode) を呼び出します。
|
|
template<size_t N> |
static errno_t | EncodeUriComponent (size_t *written, char(&buf)[N], const char *first, const char *last, bool fragment_mode) noexcept |
| EncodeUriComponent(written, buf, N, first, last, fragment_mode) を呼び出します。
|
|
template<size_t N> |
static errno_t | DecodePath (size_t *written, char(&buf)[N], const char *s) noexcept |
| DecodePath(written, buf, N, s) を呼び出します。
|
|
template<size_t N> |
static errno_t | EncodePath (size_t *written, char(&buf)[N], const char *s) noexcept |
| EncodePath(written, buf, N, s) を呼び出します。
|
|
一般的なURIをパースしたり構築したりするためのクラスです。
- 説明
HttpStyleUri
, FileStyleUri
はこのクラスを利用してURIをパースしています。
- 相対URI(相対パス)を利用する場合にもこのクラスを用います。 パースする際には、
%
エンコードされた文字の一部をデコードします。 デコードされる文字は、RFC3986のunreserved(ALPHA / DIGIT / "-" / "." / "_" / "~")
に属する文字です。 それ以外の文字は%
エンコードされたままです。 uri.Parse("http://www.example.com/dir/index.html?query=test#part1");
uri.GetScheme();
uri.GetHost();
uri.GetPath();
uri.GetQuery();
uri.GetFragment();
- 参照
- https://www.ietf.org/rfc/rfc3986.txt (RFC 3986)
-
http://www.eonet.ne.jp/~h-hash/rfc_ja/rfc3986.ja.html (RFC 3986, in Japanese)
- 各種例:
- misc/uri/uri.cpp.
Uri.h の 31 行目に定義があります。