Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

<QtEndian> - Endian Conversion Functions

The <QtEndian> header provides functions to convert between little and big endian representations of numbers.More...

    Functions

    TqFromBigEndian(const uchar * src)
    TqFromBigEndian(T src)
    TqFromLittleEndian(const uchar * src)
    TqFromLittleEndian(T src)
    voidqToBigEndian(T src, uchar * dest)
    TqToBigEndian(T src)
    voidqToLittleEndian(T src, uchar * dest)
    TqToLittleEndian(T src)

    Function Documentation

    TqFromBigEndian(constuchar * src)

    Reads a big-endian number from memory locationsrc and returns the number in the host byte order representation. On CPU architectures where the host byte order is little-endian (such as x86) this will swap the byte order; otherwise it will just read fromsrc.

    Note:Template typeT can either be a qint16, qint32 or qint64. Other types of integers, e.g., qlong, are not applicable.

    There are no data alignment constraints forsrc.

    This function was introduced in Qt 4.3.

    See alsoqFromLittleEndian(),qToBigEndian(), andqToLittleEndian().

    TqFromBigEndian(T src)

    This is an overloaded function.

    Convertssrc from big-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will returnsrc with the byte order swapped; otherwise it will returnsrc unmodified.

    This function was introduced in Qt 4.3.

    TqFromLittleEndian(constuchar * src)

    Reads a little-endian number from memory locationsrc and returns the number in the host byte order representation. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will swap the byte order; otherwise it will just read fromsrc.

    Note:Template typeT can either be a qint16, qint32 or qint64. Other types of integers, e.g., qlong, are not applicable.

    There are no data alignment constraints forsrc.

    This function was introduced in Qt 4.3.

    See alsoqFromBigEndian(),qToBigEndian(), andqToLittleEndian().

    TqFromLittleEndian(T src)

    This is an overloaded function.

    Convertssrc from little-endian byte order and returns the number in host byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will returnsrc with the byte order swapped; otherwise it will returnsrc unmodified.

    This function was introduced in Qt 4.3.

    voidqToBigEndian(T src,uchar * dest)

    Writes the numbersrc with template typeT to the memory location atdest in big-endian byte order.

    Note that template typeT can only be an integer data type (signed or unsigned).

    There are no data alignment constraints fordest.

    This function was introduced in Qt 4.3.

    See alsoqFromBigEndian(),qFromLittleEndian(), andqToLittleEndian().

    TqToBigEndian(T src)

    This is an overloaded function.

    Convertssrc from host byte order and returns the number in big-endian byte order representation of that number. On CPU architectures where the host byte order is little-endian (such as x86) this will returnsrc with the byte order swapped; otherwise it will returnsrc unmodified.

    This function was introduced in Qt 4.3.

    voidqToLittleEndian(T src,uchar * dest)

    Writes the numbersrc with template typeT to the memory location atdest in little-endian byte order.

    Note that template typeT can only be an integer data type (signed or unsigned).

    There are no data alignment constraints fordest.

    This function was introduced in Qt 4.3.

    See alsoqFromBigEndian(),qFromLittleEndian(), andqToBigEndian().

    TqToLittleEndian(T src)

    This is an overloaded function.

    Convertssrc from host byte order and returns the number in little-endian byte order representation of that number. On CPU architectures where the host byte order is big-endian (such as PowerPC) this will returnsrc with the byte order swapped; otherwise it will returnsrc unmodified.

    This function was introduced in Qt 4.3.

    © 2016 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 theGNU 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.


    [8]ページ先頭

    ©2009-2025 Movatter.jp