nlib
|
開発環境別の設定が書かれるファイルです。 [詳解]
#include "nn/nlib/Platform.h"
#include "nn/nlib/Config_linux.h"
#include <wchar.h>
#include <utility>
クラス | |
struct | nn::nlib::move_tag |
空の構造体で、関数の引数をムーブすべきことを示すために利用されます。 [詳解] | |
class | nn::nlib::ErrnoT |
errno_t をラップするクラスです。Visual Studioのデバッガ上での表示を改善します。 [詳解] | |
class | nn::nlib::Utf8Ptr |
UTF-8を格納するconst char* をラップするクラスです。Visual Studioのデバッガ上でのUTF-8の表示を改善します。 [詳解] | |
class | nn::nlib::Utf8Array< N > |
UTF-8を格納するchar の配列をラップするクラスです。Visual Studioのデバッガ上でのUTF-8の表示を改善します。 [詳解] | |
名前空間 | |
nn::nlib | |
共通して使われることの多いストリーム関連のクラス群や各種コンテナ、及びガシェットクラスが実装されています。nlib_ns はエイリアスです。 | |
マクロ定義 | |
#define | NLIB_CEXPR constexpr |
利用可能であればconstexpr が定義されます。そうでない場合は空文字列です。 | |
#define | NLIB_NOEXCEPT noexcept |
環境に合わせてnoexcept 又は同等の定義がされます。 [詳解] | |
#define | NLIB_TRY if (true) |
例外が有効なときはtry , そうでなければif (true) が定義されます。 | |
#define | NLIB_CATCH(x) if (false) |
例外が有効なときはcatch(x) , そうでなければif (true) が定義されます。 [詳解] | |
#define | NLIB_THROW |
例外が有効なときはthrow , そうでなければ空白が定義されます。 | |
#define | NLIB_STATIC_ASSERT(exp) static_assert((exp), "NLIB_STATIC_ASSERT error: " #exp) |
静的アサートが定義されます。利用可能であればstatic_assert を利用します。 [詳解] | |
#define | NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName) |
TypeName で指定されたクラスのコピーコンストラクタと代入演算子を禁止します。 [詳解] | |
#define | NLIB_SAFE_BOOL(class_name, exp) |
クラス内に安全なoperator bool() を定義します。 可能であればC++11のexplicit bool を利用します。 [詳解] | |
#define | NLIB_OVERRIDE override |
利用可能であればoverride が定義されます。そうでない場合は空文字列です。 | |
#define | NLIB_FINAL final |
利用可能であればfinal が定義されます。そうでない場合は空文字列です。 | |
#define | NLIB_ALIGNAS(x) alignas(x) |
alignas(x) 又は同等の定義がされます。 [詳解] | |
#define | NLIB_ALIGNOF(tp) alignof(tp) |
alignof(tp) 又は同等の定義がされます。 [詳解] | |
#define | NLIB_NOEMPTYFILE() |
何らかの理由で空となるファイルに記述することで、MSVCのLinker warning 4221を抑制することができます。 | |
型定義 | |
typedef nlib_utf16_t | nn::nlib::utf16_t |
UTF16の文字に対する型です。 nlib_utf16_t にtypedef されています。 | |
typedef nlib_utf32_t | nn::nlib::utf32_t |
UTF32の文字に対する型です。 nlib_utf32_t にtypedef されています。 | |
関数 | |
printf | |
各種標準ライブラリの
| |
template<size_t N> | |
errno_t | nlib_vsnprintf (size_t *count, char(&buf)[N], const char *fmt, va_list args) noexcept |
nlib_vsnprintf() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_snprintf (size_t *count, char(&buf)[N], const char *fmt,...) noexcept |
nlib_snprintf() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_vsnwprintf (size_t *count, wchar_t(&buf)[N], const wchar_t *fmt, va_list args) noexcept |
nlib_vsnwprintf() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_snwprintf (size_t *count, wchar_t(&buf)[N], const wchar_t *fmt,...) noexcept |
nlib_snwprintf() の関数テンプレート版です。 | |
ヌル終端文字列のための関数 | |
template<size_t N> | |
errno_t | nlib_strcpy (char(&s1)[N], const char *s2) noexcept |
nlib_strcpy() の関数テンプレート版です。 | |
template<size_t N> | |
size_t | nlib_strlcpy (char(&s1)[N], const char *s2) noexcept |
nlib_strlcpy(s1, s2, N) を呼び出します。 | |
template<size_t N> | |
errno_t | nlib_strncpy (char(&s1)[N], const char *s2, size_t n) noexcept |
nlib_strncpy() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_wcscpy (wchar_t(&s1)[N], const wchar_t *s2) noexcept |
nlib_wcscpy() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_wcsncpy (wchar_t(&s1)[N], const wchar_t *s2, size_t n) noexcept |
nlib_wcsncpy() の関数テンプレート版です。 | |
スレッド | |
void | nlib_thread_exit_cpp () NLIB_NORETURN |
呼び出しスレッドを終了します。 [詳解] | |
count leading zeros, count trailing zeros, popcnt, bitreverse | |
template<class T > | |
bool | nlib_is_error (const T &obj) noexcept |
処理の結果やオブジェクトの状態がエラーである場合にtrue を返します。 [詳解] | |
ユニコード | |
| |
typedef uint16_t | nlib_utf16_t |
char16_t が利用できる場合はchar16_t に、そうでない場合はuint16_t にtypedef されます。 | |
typedef uint32_t | nlib_utf32_t |
char32_t が利用できる場合はchar32_t に、そうでない場合はuint32_t にtypedef されます。 | |
NLIB_CHECK_RESULT int | nlib_utf16_to_utf32char (nlib_utf32_t *utf32, nlib_utf16_t upper, nlib_utf16_t lower) noexcept |
1つのコードポイントをUTF-16からUTF-32に変換します。 [詳解] | |
NLIB_CHECK_RESULT int | nlib_utf32char_to_utf16 (nlib_utf16_t *upper, nlib_utf16_t *lower, nlib_utf32_t utf32) noexcept |
1つのUTF-32文字をUTF-16に変換します。 [詳解] | |
NLIB_CHECK_RESULT int | nlib_utf8_to_utf32char (nlib_utf32_t *utf32, const char *utf8) noexcept |
UTF-8を1文字分のUTF-32に変換します。 [詳解] | |
NLIB_CHECK_RESULT int | nlib_utf32char_to_utf8 (char(&utf8)[4], nlib_utf32_t utf32) noexcept |
1文字のUTF-32をUTF-8に変換します。 [詳解] | |
errno_t | nlib_utf16_to_utf8 (size_t *utf8count, char *utf8, size_t buflen, const nlib_utf16_t *utf16) noexcept |
UTF-16文字列からUTF-8文字列に変換します。 [詳解] | |
errno_t | nlib_utf8_to_utf16 (size_t *utf16count, nlib_utf16_t *utf16, size_t buflen, const char *utf8) noexcept |
UTF-8文字列からUTF-16文字列に変換します。UTF-16文字列はヌル終端されます。 [詳解] | |
errno_t | nlib_utf32_to_utf8 (size_t *utf8count, char *utf8, size_t buflen, const nlib_utf32_t *utf32) noexcept |
UTF-32文字列からUTF-8文字列に変換します。 [詳解] | |
errno_t | nlib_utf8_to_utf32 (size_t *utf32count, nlib_utf32_t *utf32, size_t buflen, const char *utf8) noexcept |
UTF-8文字列からUTF-32文字列に変換します。 [詳解] | |
errno_t | nlib_memutf16_to_utf8 (size_t *to_count, size_t *from_count, char *to, size_t to_size, const nlib_utf16_t *from, size_t from_size) NLIB_NONNULL_5 |
ヌル終端しないUTF-16文字列をUTF-8文字列に変換します。 [詳解] | |
errno_t | nlib_memutf8_to_utf16 (size_t *to_count, size_t *from_count, nlib_utf16_t *to, size_t to_size, const char *from, size_t from_size) NLIB_NONNULL_5 |
ヌル終端しないUTF-8文字列をUTF-16文字列に変換します。 [詳解] | |
errno_t | nlib_memutf32_to_utf8 (size_t *to_count, size_t *from_count, char *to, size_t to_size, const nlib_utf32_t *from, size_t from_size) NLIB_NONNULL_5 |
ヌル終端しないUTF-32文字列をUTF-8文字列に変換します。 [詳解] | |
errno_t | nlib_memutf8_to_utf32 (size_t *to_count, size_t *from_count, nlib_utf32_t *to, size_t to_size, const char *from, size_t from_size) NLIB_NONNULL_5 |
ヌル終端しないUTF-8文字列をUTF-32文字列に変換します。 [詳解] | |
NLIB_CHECK_RESULT size_t | nlib_utf16len (const nlib_utf16_t *str) noexcept |
ヌル文字を含まないnlib_utf16_t の数を数えます。 [詳解] | |
NLIB_CHECK_RESULT size_t | nlib_utf16nlen (const nlib_utf16_t *str, size_t maxsize) noexcept |
nlib_strnlen() のUTF-16版です。 [詳解] | |
errno_t | nlib_utf16cpy (nlib_utf16_t *s1, size_t s1max, const nlib_utf16_t *s2) noexcept |
nlib_strcpy() のUTF-16版です。 [詳解] | |
errno_t | nlib_utf16ncpy (nlib_utf16_t *s1, size_t s1max, const nlib_utf16_t *s2, size_t n) noexcept |
nlib_strcpy() のUTF-16版です。 [詳解] | |
NLIB_CHECK_RESULT size_t | nlib_utf32len (const nlib_utf32_t *str) noexcept |
ヌル文字を含まないnlib_utf32_t の数を数えます。 [詳解] | |
NLIB_CHECK_RESULT size_t | nlib_utf32nlen (const nlib_utf32_t *str, size_t maxsize) noexcept |
nlib_strnlen() のUTF-32版です。 [詳解] | |
errno_t | nlib_utf32cpy (nlib_utf32_t *s1, size_t s1max, const nlib_utf32_t *s2) noexcept |
nlib_strcpy() のUTF-32版です。 [詳解] | |
errno_t | nlib_utf32ncpy (nlib_utf32_t *s1, size_t s1max, const nlib_utf32_t *s2, size_t n) noexcept |
nlib_strcpy() のUTF-32版です。 [詳解] | |
errno_t | nlib_utf16cplen (size_t *count, const nlib_utf16_t *str) noexcept |
文字列中のコードポイントの数を取得します。 [詳解] | |
errno_t | nlib_utf16cplen_ex (size_t *count, size_t *len, const nlib_utf16_t *str) noexcept |
文字列中のコードポイントの数を取得します。 [詳解] | |
NLIB_CHECK_RESULT errno_t | nlib_utf32cplen (size_t *count, const nlib_utf32_t *str) noexcept |
文字列中のコードポイントの数を取得します。 [詳解] | |
template<size_t N> | |
errno_t | nlib_wide_to_utf8 (size_t *result, char(&utf8)[N], const wchar_t *wcstr) noexcept |
nlib_wide_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_utf8_to_wide (size_t *result, wchar_t(&wcstr)[N], const char *utf8) noexcept |
nlib_utf8_to_wide() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_utf16_to_utf8 (size_t *utf8count, char(&utf8)[N], const nlib_utf16_t *utf16) noexcept |
nlib_utf16_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_utf8_to_utf16 (size_t *utf16count, nlib_utf16_t(&utf16)[N], const char *utf8) noexcept |
nlib_utf8_to_utf16() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_utf32_to_utf8 (size_t *utf8count, char(&utf8)[N], const nlib_utf32_t *utf32) noexcept |
nlib_utf32_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_utf8_to_utf32 (size_t *utf32count, nlib_utf32_t(&utf32)[N], const char *utf8) noexcept |
nlib_utf8_to_utf32() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memutf16_to_utf8 (size_t *to_count, size_t *from_count, char(&to)[N], const nlib_utf16_t *from, size_t from_size) noexcept |
nlib_memutf16_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memutf8_to_utf16 (size_t *to_count, size_t *from_count, nlib_utf16_t(&to)[N], const char *from, size_t from_size) noexcept |
nlib_memutf8_to_utf16() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memutf32_to_utf8 (size_t *to_count, size_t *from_count, char(&to)[N], const nlib_utf32_t *from, size_t from_size) noexcept |
nlib_memutf32_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memutf8_to_utf32 (size_t *to_count, size_t *from_count, nlib_utf32_t(&to)[N], const char *from, size_t from_size) noexcept |
nlib_memutf8_to_utf32() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memwide_to_utf8 (size_t *to_count, size_t *from_count, char(&to)[N], const wchar_t *from, size_t from_size) noexcept |
nlib_memwide_to_utf8() の関数テンプレート版です。 | |
template<size_t N> | |
errno_t | nlib_memutf8_to_wide (size_t *to_count, size_t *from_count, wchar_t(&to)[N], const char *from, size_t from_size) noexcept |
nlib_memutf8_to_wide() の関数テンプレート版です。 | |
開発環境別の設定が書かれるファイルです。
Config.h に定義があります。
© 2012-2016 Nintendo Co., Ltd. All rights reserved.