114 Q_ASSERT_X(
size >= 0,
"QBitArray::QBitArray",
"Size must be greater than or equal to 0.");
119 memset(
c + 1,
value ? 0xff : 0, d.
size() - 1);
122 *(
c + 1 +
size / 8) &= (1 << (
size & 7)) - 1;
169 return on ? numBits :
size() - numBits;
193 memset(
c +
s, 0, d.
size() -
s);
195 *(
c + 1 +
size / 8) &= (1 << (
size & 7)) - 1;
303 bits[nbytes] &= 0xffU >> (8 - (
size & 7));
607 *(
a2 - 1) &= (1 << (sz % 8)) - 1;
725#ifndef QT_NO_DATASTREAM
740 out.writeRawData(
ba.d.constData() + 1,
ba.d.
size() - 1);
746 out.writeRawData(
ba.d.constData() + 1,
ba.d.
size() - 1);
781 while (allocated < totalBytes) {
793 if (paddingMask != ~0x0 && (
ba.d.constData()[
ba.d.
size() - 1] & paddingMask)) {
804#ifndef QT_NO_DEBUG_STREAM
808 dbg.nospace() <<
"QBitArray(";
815 if (!(
i % 4) && (
i <
array.size()))
QBitArray operator^(const QBitArray &a1, const QBitArray &a2)
Returns a bit array that is the XOR of the bit arrays a1 and a2.
qsizetype count() const
Same as size().
QBitArray & operator|=(const QBitArray &)
Performs the OR operation between all bits in this bit array and other.
void resize(qsizetype size)
Resizes the bit array to size bits.
void setBit(qsizetype i)
Sets the bit at index position i to 1.
static QBitArray fromBits(const char *data, qsizetype len)
QBitArray operator|(const QBitArray &a1, const QBitArray &a2)
Returns a bit array that is the OR of the bit arrays a1 and a2.
quint32 toUInt32(QSysInfo::Endian endianness, bool *ok=nullptr) const noexcept
QBitArray & operator&=(const QBitArray &)
Performs the AND operation between all bits in this bit array and other.
bool fill(bool val, qsizetype size=-1)
Sets every bit in the bit array to value, returning true if successful; otherwise returns false.
QBitArray & operator^=(const QBitArray &)
Performs the XOR operation between all bits in this bit array and other.
QBitArray operator~() const
Returns a bit array that contains the inverted bits of this bit array.
QBitArray operator&(const QBitArray &a1, const QBitArray &a2)
Returns a bit array that is the AND of the bit arrays a1 and a2.
QBitArray() noexcept
Constructs an empty bit array.
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
iterator end()
Returns an \l{STL-style iterators}{STL-style iterator} pointing just after the last byte in the byte-...
void clear()
Clears the contents of the byte array and makes it null.
void resize(qsizetype size)
Sets the size of the byte array to size bytes.
\inmodule QtCore\reentrant
Endian
\value BigEndian Big-endian byte order (also called Network byte order) \value LittleEndian Little-en...
Combined button and popup list for selecting options.
constexpr Initialization Uninitialized
Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR uint qPopulationCount(quint32 v) noexcept
QDebug operator<<(QDebug dbg, const QBitArray &array)
static bool testBit(long bit, const long *field)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
#define Q_ASSERT_X(cond, x, msg)
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
unsigned long long quint64
QTextStream out(stdout)
[7]