zoukankan      html  css  js  c++  java
  • <QtEndian>


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

    Functions

    T qFromBigEndian(const uchar * src)
    T qFromBigEndian(T src)
    T qFromLittleEndian(const uchar * src)
    T qFromLittleEndian(T src)
    void qToBigEndian(T src, uchar * dest)
    T qToBigEndian(T src)
    void qToLittleEndian(T src, uchar * dest)
    T qToLittleEndian(T src)
    Function Documentation

    T qFromBigEndian(const uchar * src)
    Reads a big-endian number from memory location src 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 from src.

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

    There are no data alignment constraints for src.

    This function was introduced in Qt 4.3.

    See also qFromLittleEndian(), qToBigEndian(), and qToLittleEndian().

    T qFromBigEndian(T src)
    This is an overloaded function.

    Converts src 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 return src with the byte order swapped; otherwise it will return src unmodified.

    This function was introduced in Qt 4.3.

    T qFromLittleEndian(const uchar * src)
    Reads a little-endian number from memory location src 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 from src.

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

    There are no data alignment constraints for src.

    This function was introduced in Qt 4.3.

    See also qFromBigEndian(), qToBigEndian(), and qToLittleEndian().

    T qFromLittleEndian(T src)
    This is an overloaded function.

    Converts src 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 return src with the byte order swapped; otherwise it will return src unmodified.

    This function was introduced in Qt 4.3.

    void qToBigEndian(T src, uchar * dest)
    Writes the number src with template type T to the memory location at dest in big-endian byte order.

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

    There are no data alignment constraints for dest.

    This function was introduced in Qt 4.3.

    See also qFromBigEndian(), qFromLittleEndian(), and qToLittleEndian().

    T qToBigEndian(T src)
    This is an overloaded function.

    Converts src 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 return src with the byte order swapped; otherwise it will return src unmodified.

    This function was introduced in Qt 4.3.

    void qToLittleEndian(T src, uchar * dest)
    Writes the number src with template type T to the memory location at dest in little-endian byte order.

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

    There are no data alignment constraints for dest.

    This function was introduced in Qt 4.3.

    See also qFromBigEndian(), qFromLittleEndian(), and qToBigEndian().

    T qToLittleEndian(T src)
    This is an overloaded function.

    Converts src 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 return src with the byte order swapped; otherwise it will return src unmodified.

    This function was introduced in Qt 4.3.

  • 相关阅读:
    清除浮动
    svg自己记得文档
    CSS3最颠覆性的动画效果,基本属性[过渡和2D]
    下载svg图片转化为字体使用!!!!!!
    CSS3 Transform的perspective属性【转载,自己学习使用】
    CSS炫酷样式,不断编辑更新...
    VC++ GDI+编程的字体和文本绘制
    图像处理常用算法
    详细解说STL hash_map系列
    微软公司软件开发模式简介 收藏
  • 原文地址:https://www.cnblogs.com/lvdongjie/p/5384616.html
Copyright © 2011-2022 走看看