![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include "QtCore/private/qglobal_p.h"
#include <chrono>
#include <limits.h>
#include <time.h>
Go to the source code of this file.
Classes | |
struct | CalculateGrowingBlockSizeResult |
Namespaces | |
namespace | QtMiscUtils |
Functions | |
constexpr char | QtMiscUtils::toHexUpper (char32_t value) noexcept |
constexpr char | QtMiscUtils::toHexLower (char32_t value) noexcept |
constexpr bool | QtMiscUtils::isHexDigit (char32_t c) noexcept |
constexpr int | QtMiscUtils::fromHex (char32_t c) noexcept |
constexpr char | QtMiscUtils::toOct (char32_t value) noexcept |
constexpr bool | QtMiscUtils::isOctalDigit (char32_t c) noexcept |
constexpr int | QtMiscUtils::fromOct (char32_t c) noexcept |
constexpr bool | QtMiscUtils::isAsciiDigit (char32_t c) noexcept |
constexpr bool | QtMiscUtils::isAsciiUpper (char32_t c) noexcept |
constexpr bool | QtMiscUtils::isAsciiLower (char32_t c) noexcept |
constexpr bool | QtMiscUtils::isAsciiLetterOrNumber (char32_t c) noexcept |
constexpr char | QtMiscUtils::toAsciiLower (char ch) noexcept |
constexpr char | QtMiscUtils::toAsciiUpper (char ch) noexcept |
constexpr int | QtMiscUtils::caseCompareAscii (char lhs, char rhs) noexcept |
constexpr int | QtMiscUtils::isAsciiPrintable (char32_t ch) noexcept |
constexpr int | QtMiscUtils::qt_lencmp (qsizetype lhs, qsizetype rhs) noexcept |
qsizetype Q_CORE_EXPORT Q_DECL_CONST_FUNCTION | qCalculateBlockSize (qsizetype elementCount, qsizetype elementSize, qsizetype headerSize=0) noexcept |
CalculateGrowingBlockSizeResult Q_CORE_EXPORT Q_DECL_CONST_FUNCTION | qCalculateGrowingBlockSize (qsizetype elementCount, qsizetype elementSize, qsizetype headerSize=0) noexcept |
|
noexcept |
Returns the memory block size for a container containing elementCount elements, each of elementSize bytes, plus a header of headerSize bytes. That is, this function returns {elementCount
* elementSize + headerSize}
but unlike the simple calculation, it checks for overflows during the multiplication and the addition.
Both elementCount and headerSize can be zero, but elementSize cannot.
This function returns -1 on overflow or if the memory block size would not fit a qsizetype.
Definition at line 52 of file qarraydata.cpp.
|
noexcept |
Returns the memory block size and the number of elements that will fit in that block for a container containing elementCount elements, each of elementSize bytes, plus a header of headerSize bytes. This function assumes the container will grow and pre-allocates a growth factor.
Both elementCount and headerSize can be zero, but elementSize cannot.
This function returns -1 on overflow or if the memory block size would not fit a qsizetype.
Definition at line 85 of file qarraydata.cpp.