43 #include <QtCore/qscopedpointer.h>
44 #include <QtCore/qiodevicebase.h>
45 #include <QtCore/qcontainerfwd.h>
46 #include <QtCore/qnamespace.h>
49 #error qdatastream.h must be included before any header file that defines Status
54 #if QT_CORE_REMOVED_SINCE(6, 3)
60 #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
63 class StreamStateSaver;
105 Qt_DefaultCompiledVersion = Qt_6_3
106 #if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
107 #error Add the datastream version for this Qt version and update Qt_DefaultCompiledVersion
140 void setStatus(
Status status);
143 FloatingPointPrecision floatingPointPrecision()
const;
144 void setFloatingPointPrecision(FloatingPointPrecision
precision);
146 ByteOrder byteOrder()
const;
147 void setByteOrder(ByteOrder);
164 #if QT_CORE_REMOVED_SINCE(6, 3)
184 #if QT_CORE_REMOVED_SINCE(6, 3)
195 int readRawData(
char *,
int len);
198 int writeRawData(
const char *,
int len);
200 int skipRawData(
int len);
202 void startTransaction();
203 bool commitTransaction();
204 void rollbackTransaction();
205 void abortTransaction();
207 bool isDeviceTransactionStarted()
const;
220 int readBlock(
char *
data,
int len);
231 if (!
stream->isDeviceTransactionStarted())
238 stream->setStatus(oldStatus);
247 template <
typename Container>
269 template <
typename Container>
290 template <
typename Container>
312 template <
typename Container>
322 template <
typename Container>
326 auto it =
c.constBegin();
327 auto end =
c.constEnd();
329 s <<
it.key() <<
it.value();
336 template <
typename Container>
340 auto it =
c.constBegin();
341 auto end =
c.constEnd();
343 const auto rangeStart =
it++;
344 while (
it !=
end && rangeStart.key() ==
it.key())
358 template<
typename ...T>
360 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator<QDataStream, T>...>,
QDataStream &>;
361 template<
typename Container,
typename ...T>
363 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator_container<QDataStream, Container, T>...>,
QDataStream &>;
365 template<
typename ...T>
367 std::enable_if_t<std::conjunction_v<QTypeTraits::has_istream_operator<QDataStream, T>...>,
QDataStream &>;
368 template<
typename Container,
typename ...T>
370 std::enable_if_t<std::conjunction_v<QTypeTraits::has_istream_operator_container<QDataStream, Container, T>...>,
QDataStream &>;
380 {
return byteorder; }
389 {
return *
this >>
reinterpret_cast<qint8&
>(
i); }
392 {
return *
this >>
reinterpret_cast<qint8&
>(
i); }
395 {
return *
this >>
reinterpret_cast<qint16&
>(
i); }
398 {
return *
this >>
reinterpret_cast<qint32&
>(
i); }
401 {
return *
this >>
reinterpret_cast<qint64&
>(
i); }
404 {
return *
this <<
qint8(
i); }
407 {
return *
this <<
qint8(
i); }
418 template <
typename Enum>
422 template <
typename Enum>
431 template <
typename T>
436 template <
typename T>
455 template <
typename T>
461 template <
typename T>
467 template <
class Key,
class T>
473 template <
class Key,
class T>
480 template <
class Key,
class T>
486 template <
class Key,
class T>
492 template <
class Key,
class T>
498 template <
class Key,
class T>
504 template <
class Key,
class T>
510 template <
class Key,
class T>
516 template <
class T1,
class T2>
519 s >>
p.first >>
p.second;
523 template <
class T1,
class T2>
526 s <<
p.first <<
p.second;
544 template <
class Key,
class T>
547 template <
class Key,
class T>
550 template <
class Key,
class T>
553 template <
class Key,
class T>
556 template <
class Key,
class T>
559 template <
class Key,
class T>
562 template <
class Key,
class T>
565 template <
class Key,
class T>
568 template <
class T1,
class T2>
571 template <
class T1,
class T2>
small capitals from c petite p scientific i
[1]
The QByteArray class provides an array of bytes.
The QDataStream class provides serialization of binary data to a QIODevice.
QDataStream & operator>>(char &i)
QDataStream & operator>>(std::nullptr_t &ptr)
operator>>(QDataStream &ds, qfloat16 &f)
QDataStream & operator<<(std::nullptr_t)
ByteOrder byteOrder() const
operator<<(QDataStream &ds, qfloat16 f)
QIODevice * device() const
QDataStream & operator<<(char i)
The QFlag class is a helper data type for QFlags.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
std::conditional< std::is_unsigned< typename std::underlying_type< Enum >::type >::value, unsigned int, signed int >::type Int
The QHash class is a template class that provides a hash-table-based dictionary.
Base class for QIODevice that provides flags describing the mode in which a device is opened.
The QIODevice class is the base interface class of all I/O devices in Qt.
static constexpr QKeyCombination fromCombined(int combined)
constexpr int toCombined() const noexcept
The QMultiHash class is a convenience QHash subclass that provides multi-valued hashes.
StreamStateSaver(QDataStream *s)
Provides 16-bit floating point support.
QHash< int, QWidget * > hash
[35multi]
QMap< QString, QString > map
[6]
typename C::value_type value_type
typename C::key_type key_type
typename C::mapped_type mapped_type
QDataStream & readListBasedContainer(QDataStream &s, Container &c)
QDataStream & writeAssociativeMultiContainer(QDataStream &s, const Container &c)
QDataStream & writeAssociativeContainer(QDataStream &s, const Container &c)
QDataStream & readAssociativeContainer(QDataStream &s, Container &c)
QDataStream & readArrayBasedContainer(QDataStream &s, Container &c)
QDataStream & writeSequentialContainer(QDataStream &s, const Container &c)
int distance(TestIterator &a, TestIterator &b)
std::enable_if_t< std::conjunction_v< QTypeTraits::has_istream_operator< QDataStream, T >... >, QDataStream & > QDataStreamIfHasIStreamOperators
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator_container< QDataStream, Container, T >... >, QDataStream & > QDataStreamIfHasOStreamOperatorsContainer
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator< QDataStream, T >... >, QDataStream & > QDataStreamIfHasOStreamOperators
QDataStream & operator<<(QDataStream &s, QFlags< Enum > e)
std::enable_if_t< std::conjunction_v< QTypeTraits::has_istream_operator_container< QDataStream, Container, T >... >, QDataStream & > QDataStreamIfHasIStreamOperatorsContainer
QDataStream & operator>>(QDataStream &s, QFlags< Enum > &e)
unsigned long long quint64
#define Q_DISABLE_COPY(Class)
QT_BEGIN_NAMESPACE typedef signed char qint8
GLsizei const GLfloat * v
[13]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLint GLint * precision
QFuture< QSet< QChar > > set
[10]