このページでは

QByteArray::FromBase64Result Class

class QByteArray::FromBase64Result

QByteArray::FromBase64Result クラスは、QByteArray::fromBase64Encoding の呼び出し結果を保持します。詳細...

パブリック関数

operator bool() const
QByteArray &&operator*() &&
QByteArray &operator*() &
const QByteArray &&operator*() const &&
const QByteArray &operator*() const &

パブリック変数

QByteArray decoded
QByteArray::Base64DecodingStatus decodingStatus
size_t qHash(const QByteArray::FromBase64Result &key, size_t seed = 0)
bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)
bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)

詳細な説明

このクラスのオブジェクトを使用すると、変換が成功したかどうかを確認でき、成功した場合はデコードされたQByteArray を取得できます。QByteArray::FromBase64Result に対して定義されている変換演算子により、その使用方法は簡単です:

void process(const QByteArray &);

if (auto result = QByteArray::fromBase64Encoding(encodedData))
    process(*result);

あるいは、変換ステータスやデコードされたデータに直接アクセスすることも可能です:

auto result = QByteArray::fromBase64Encoding(encodedData);
if (result.decodingStatus == QByteArray::Base64DecodingStatus::Ok)
    process(result.decoded);

QByteArray::fromBase64も参照してください 。

メンバ関数のドキュメント

[explicit noexcept] FromBase64Result::operator bool() const

デコードが成功したかどうかを返します。これは、decodingStatus メンバーがQByteArray::Base64DecodingStatus::Okと等しいかどうかを確認することと同じです。

[noexcept] QByteArray &&FromBase64Result::operator*() &&

[noexcept] QByteArray &FromBase64Result::operator*() &

[noexcept] const QByteArray &&FromBase64Result::operator*() const &&

[noexcept] const QByteArray &FromBase64Result::operator*() const &

デコードされたバイト配列を返します。

メンバ変数のドキュメント

QByteArray FromBase64Result::decoded

デコードされたバイト配列が含まれています。

QByteArray::Base64DecodingStatus FromBase64Result::decodingStatus

デコードが成功したかどうかを示し、QByteArray::Base64DecodingStatus 型の値として表されます。

関連する非メンバー

[noexcept] size_t qHash(const QByteArray::FromBase64Result &key, size_t seed = 0)

`key` のハッシュ値を返します。計算のシードには `seed ` を使用します。

[noexcept] bool operator!=(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)

lhs とrhs が異なる場合は `true ` を返し、それ以外の場合は `false` を返します。

[noexcept] bool operator==(const QByteArray::FromBase64Result &lhs, const QByteArray::FromBase64Result &rhs)

lhs とrhs が等しい場合は `true ` を返し、そうでない場合は `false` を返します。

lhs また、rhs が等しいのは、それらが同じデコードステータスを含む場合に限られ、そのステータスが QByteArray::Base64DecodingStatus::Ok である場合は、それらが同じデコード済みデータを含む場合に限られる。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.