16 #ifndef INCLUDE_NN_NLIB_HTTPSTYLEURI_H_ 17 #define INCLUDE_NN_NLIB_HTTPSTYLEURI_H_ 22 #include "nn/nlib/Swap.h" 28 typedef std::pair<const char*, const char*>
KeyValue;
34 bool Parse(
const char* first,
const char* last)
NLIB_NOEXCEPT;
35 bool Parse(
const char* str) NLIB_NOEXCEPT {
43 char (&buf)[N])
const NLIB_NOEXCEPT {
44 return this->ComposeString(buf, N);
53 bool AddQuery(
const char* key,
const char* value)
NLIB_NOEXCEPT;
61 const char* GetQueryValue(
const char* key)
const NLIB_NOEXCEPT;
63 const KeyValue* GetQueryKeyValue(
size_t i)
const NLIB_NOEXCEPT;
74 struct HttpStyleUriPrivate;
75 mutable HttpStyleUriPrivate* prv_;
80 #ifndef __cpp_rvalue_references 83 #endif // INCLUDE_NN_NLIB_HTTPSTYLEURI_H_ #define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
TypeName で指定されたクラスのコピーコンストラクタと代入演算子を禁止します。
http/httpsスキームを用いたURIをパースしたりURI文字列を構築したりするためのクラスです。 ...
bool Parse(const char *str) noexcept
Parse(str, str + nlib_strlen(str))を返します。
std::pair< const char *, const char * > KeyValue
クエリのキーと値を格納する型です。
bool ComposeString(char(&buf)[N]) const noexcept
ComposeString(buf, N) を呼び出します。
constexpr HttpStyleUri() noexcept
デフォルトコンストラクタです。オブジェクトを初期化します。
#define NLIB_NOEXCEPT
環境に合わせてnoexcept 又は同等の定義がされます。
#define NLIB_CEXPR
利用可能であればconstexprが定義されます。そうでない場合は空文字列です。
一般的なURIをパースしたり構築したりするためのクラスです。
#define NLIB_FINAL
利用可能であればfinalが定義されます。そうでない場合は空文字列です。