Cute   Learning Hub


  • DataStream
  • DataStream Class

    class Cute::DataStream

    The Cute::DataStream allows custom types to be streamed in remote signal slot connections as well as direct remote slot calls. More...

    Header: #include <DataStream>

    Public Functions

    DataStream(QIODevice *ioDevice)
    ~DataStream()
    bool atEnd() const
    qint32 containerReserveLimit() const
    QIODevice *device() const
    bool isValid() const
    qint64 readData(char *data, qint64 length)
    void resetStatus()
    void setContainerReserveLimit(qint32 containerReserveLimit)
    qint64 writeData(const char *data, qint64 length)
    Cute::DataStream &operator<<(qint8 i)
    Cute::DataStream &operator<<(quint8 i)
    Cute::DataStream &operator<<(const std::deque<T> &d)
    Cute::DataStream &operator<<(const QSet<T> &set)
    Cute::DataStream &operator<<(const std::unordered_set<T> &set)
    Cute::DataStream &operator<<(const QStack<T> &stack)
    Cute::DataStream &operator<<(const std::stack<T> &stack)
    Cute::DataStream &operator<<(const QQueue<T> &q)
    Cute::DataStream &operator<<(const std::queue<T> &q)
    Cute::DataStream &operator<<(const QMap<Key, T> &map)
    Cute::DataStream &operator<<(const QHash<Key, T> &hash)
    Cute::DataStream &operator<<(const std::map<Key, T> &map)
    Cute::DataStream &operator<<(const std::unordered_map<Key, T> &map)
    Cute::DataStream &operator<<(const QMultiMap<Key, T> &map)
    Cute::DataStream &operator<<(const QMultiHash<Key, T> &hash)
    Cute::DataStream &operator<<(const std::multimap<Key, T> &map)
    Cute::DataStream &operator<<(const std::unordered_multimap<Key, T> &map)
    Cute::DataStream &operator<<(const std::pair<T1, T2> &p)
    Cute::DataStream &operator<<(qint16 i)
    Cute::DataStream &operator<<(quint16 i)
    Cute::DataStream &operator<<(qint32 i)
    Cute::DataStream &operator<<(quint32 i)
    Cute::DataStream &operator<<(qint64 i)
    Cute::DataStream &operator<<(quint64 i)
    Cute::DataStream &operator<<(float f)
    Cute::DataStream &operator<<(double d)
    Cute::DataStream &operator<<(qfloat16 f)
    Cute::DataStream &operator<<(std::nullptr_t)
    Cute::DataStream &operator<<(bool b)
    Cute::DataStream &operator<<(char16_t c)
    Cute::DataStream &operator<<(char32_t c)
    Cute::DataStream &operator<<(char c)
    Cute::DataStream &operator<<(QChar c)
    Cute::DataStream &operator<<(const QBitArray &ba)
    Cute::DataStream &operator<<(const QUrl &url)
    Cute::DataStream &operator<<(const QUuid &id)
    Cute::DataStream &operator<<(const QDate &date)
    Cute::DataStream &operator<<(const QTime &time)
    Cute::DataStream &operator<<(const QTimeZone &tz)
    Cute::DataStream &operator<<(const QDateTime &dt)
    Cute::DataStream &operator<<(const QLocale &l)
    Cute::DataStream &operator<<(const QRegularExpression &re)
    Cute::DataStream &operator<<(QFlags<Enum> e)
    Cute::DataStream &operator<<(const QVariant &variant)
    Cute::DataStream &operator<<(const QByteArray &ba)
    Cute::DataStream &operator<<(const std::string &str)
    Cute::DataStream &operator<<(const QString &str)
    Cute::DataStream &operator<<(const std::u16string &str)
    Cute::DataStream &operator<<(const std::u32string &str)
    Cute::DataStream &operator<<(const QList<T> &list)
    Cute::DataStream &operator<<(const std::vector<T> &v)
    Cute::DataStream &operator<<(const std::list<T> &l)
    Cute::DataStream &operator>>(qint8 &i)
    Cute::DataStream &operator>>(quint8 &i)
    Cute::DataStream &operator>>(std::deque<T> &d)
    Cute::DataStream &operator>>(QSet<T> &set)
    Cute::DataStream &operator>>(std::unordered_set<T> &set)
    Cute::DataStream &operator>>(QStack<T> &stack)
    Cute::DataStream &operator>>(std::stack<T> &stack)
    Cute::DataStream &operator>>(QQueue<T> &q)
    Cute::DataStream &operator>>(std::queue<T> &q)
    Cute::DataStream &operator>>(QMap<Key, T> &map)
    Cute::DataStream &operator>>(QHash<Key, T> &hash)
    Cute::DataStream &operator>>(std::map<Key, T> &map)
    Cute::DataStream &operator>>(std::unordered_map<Key, T> &map)
    Cute::DataStream &operator>>(QMultiMap<Key, T> &map)
    Cute::DataStream &operator>>(QMultiHash<Key, T> &hash)
    Cute::DataStream &operator>>(std::multimap<Key, T> &map)
    Cute::DataStream &operator>>(std::unordered_multimap<Key, T> &map)
    Cute::DataStream &operator>>(std::pair<T1, T2> &p)
    Cute::DataStream &operator>>(qint16 &i)
    Cute::DataStream &operator>>(quint16 &i)
    Cute::DataStream &operator>>(qint32 &i)
    Cute::DataStream &operator>>(quint32 &i)
    Cute::DataStream &operator>>(qint64 &i)
    Cute::DataStream &operator>>(quint64 &i)
    Cute::DataStream &operator>>(float &f)
    Cute::DataStream &operator>>(double &d)
    Cute::DataStream &operator>>(qfloat16 &f)
    Cute::DataStream &operator>>(std::nullptr_t &ptr)
    Cute::DataStream &operator>>(bool &b)
    Cute::DataStream &operator>>(char16_t &c)
    Cute::DataStream &operator>>(char32_t &c)
    Cute::DataStream &operator>>(char &c)
    Cute::DataStream &operator>>(QChar &c)
    Cute::DataStream &operator>>(QBitArray &ba)
    Cute::DataStream &operator>>(QUrl &url)
    Cute::DataStream &operator>>(QUuid &id)
    Cute::DataStream &operator>>(QDate &date)
    Cute::DataStream &operator>>(QTime &time)
    Cute::DataStream &operator>>(QTimeZone &tz)
    Cute::DataStream &operator>>(QDateTime &dt)
    Cute::DataStream &operator>>(QLocale &l)
    Cute::DataStream &operator>>(QRegularExpression &re)
    Cute::DataStream &operator>>(QFlags<Enum> &e)
    Cute::DataStream &operator>>(QVariant &variant)
    Cute::DataStream &operator>>(QByteArray &ba)
    Cute::DataStream &operator>>(std::string &str)
    Cute::DataStream &operator>>(QString &str)
    Cute::DataStream &operator>>(std::u16string &str)
    Cute::DataStream &operator>>(std::u32string &str)
    Cute::DataStream &operator>>(QList<T> &list)
    Cute::DataStream &operator>>(std::vector<T> &v)
    Cute::DataStream &operator>>(std::list<T> &l)

    Detailed Description

    Member Function Documentation

    DataStream::DataStream(QIODevice *ioDevice)

    Constructs a data stream that uses ioDevice as its I/O device.

    DataStream::~DataStream()

    Destroys the data stream.

    bool DataStream::atEnd() const

    Returns true if this data stream is at the end of its I/O device.

    qint32 DataStream::containerReserveLimit() const

    Returns the number of bytes allowed to be allocated by this data stream when reading containers from data. The default value is 4096 bytes.

    See also setContainerReserveLimit().

    QIODevice *DataStream::device() const

    Returns the I/O device associated with this data stream.

    bool DataStream::isValid() const

    Returns true if this data stream is valid. Otherwise, false is returned.

    qint64 DataStream::readData(char *data, qint64 length)

    Reads length bytes from the stream into data and returns the number of bytes read.

    void DataStream::resetStatus()

    Resets the status of this data stream.

    void DataStream::setContainerReserveLimit(qint32 containerReserveLimit)

    Sets the maximum allowed size in bytes that can be reserved by this stream when reading container from data to containerReserveLimit. The default value is 4096 bytes.

    See also containerReserveLimit().

    qint64 DataStream::writeData(const char *data, qint64 length)

    Writes length bytes of data pointed by data to the stream and returns the number of bytes written.

    Cute::DataStream &DataStream::operator<<(qint8 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(quint8 i)

    Writes i to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::deque<T> &d)

    Writes d to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const QSet<T> &set)

    Writes set to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::unordered_set<T> &set)

    Writes set to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const QStack<T> &stack)

    Writes stack to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::stack<T> &stack)

    Writes stack to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const QQueue<T> &q)

    Writes q to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::queue<T> &q)

    Writes q to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const QMap<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const QHash<Key, T> &hash)

    Writes hash to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const std::map<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const std::unordered_map<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const QMultiMap<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const QMultiHash<Key, T> &hash)

    Writes hash to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const std::multimap<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator<<(const std::unordered_multimap<Key, T> &map)

    Writes map to the stream and returns a reference to the stream.

    template <typename T1, typename T2> Cute::DataStream &DataStream::operator<<(const std::pair<T1, T2> &p)

    Writes p to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(qint16 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(quint16 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(qint32 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(quint32 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(qint64 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(quint64 i)

    Writes i to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(float f)

    Writes f to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(double d)

    Writes d to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(qfloat16 f)

    Writes f to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(std::nullptr_t)

    Writes null pointer to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(bool b)

    Writes b to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(char16_t c)

    Writes c to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(char32_t c)

    Writes c to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(char c)

    Writes c to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(QChar c)

    Writes c to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QBitArray &ba)

    Writes ba to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QUrl &url)

    Writes url to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QUuid &id)

    Writes id to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QDate &date)

    Writes date to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QTime &time)

    Writes time to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QTimeZone &tz)

    Writes tz to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QDateTime &dt)

    Writes dt to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QLocale &l)

    Writes l to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QRegularExpression &re)

    Writes re to the stream and returns a reference to the stream.

    template <typename Enum> Cute::DataStream &DataStream::operator<<(QFlags<Enum> e)

    Writes e to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QVariant &variant)

    Writes variant to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QByteArray &ba)

    Writes ba to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const std::string &str)

    Writes str to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const QString &str)

    Writes str to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const std::u16string &str)

    Writes str to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator<<(const std::u32string &str)

    Writes str to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const QList<T> &list)

    Writes list to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::vector<T> &v)

    Writes v to the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator<<(const std::list<T> &l)

    Writes l to the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(qint8 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(quint8 &i)

    Reads i from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::deque<T> &d)

    Reads d from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(QSet<T> &set)

    Reads set from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::unordered_set<T> &set)

    Reads set from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(QStack<T> &stack)

    Reads stack from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::stack<T> &stack)

    Reads stack from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(QQueue<T> &q)

    Reads q from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::queue<T> &q)

    Reads q from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(QMap<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(QHash<Key, T> &hash)

    Reads hash from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(std::map<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(std::unordered_map<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(QMultiMap<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(QMultiHash<Key, T> &hash)

    Reads hash from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(std::multimap<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename Key, typename T> Cute::DataStream &DataStream::operator>>(std::unordered_multimap<Key, T> &map)

    Reads map from the stream and returns a reference to the stream.

    template <typename T1, typename T2> Cute::DataStream &DataStream::operator>>(std::pair<T1, T2> &p)

    Reads p from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(qint16 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(quint16 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(qint32 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(quint32 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(qint64 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(quint64 &i)

    Reads i from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(float &f)

    Reads f from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(double &d)

    Reads d from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(qfloat16 &f)

    Reads f from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(std::nullptr_t &ptr)

    Reads ptr from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(bool &b)

    Reads b from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(char16_t &c)

    Reads c from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(char32_t &c)

    Reads c from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(char &c)

    Reads c from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QChar &c)

    Reads c from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QBitArray &ba)

    Reads ba from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QUrl &url)

    Reads url from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QUuid &id)

    Reads id from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QDate &date)

    Reads date from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QTime &time)

    Reads time from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QTimeZone &tz)

    Reads tz from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QDateTime &dt)

    Reads dt from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QLocale &l)

    Reads l from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QRegularExpression &re)

    Reads re from the stream and returns a reference to the stream.

    template <typename Enum> Cute::DataStream &DataStream::operator>>(QFlags<Enum> &e)

    Reads e from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QVariant &variant)

    Reads variant from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QByteArray &ba)

    Reads ba from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(std::string &str)

    Reads str from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(QString &str)

    Reads str from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(std::u16string &str)

    Reads str from the stream and returns a reference to the stream.

    Cute::DataStream &DataStream::operator>>(std::u32string &str)

    Reads str from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(QList<T> &list)

    Reads list from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::vector<T> &v)

    Reads v from the stream and returns a reference to the stream.

    template <typename T> Cute::DataStream &DataStream::operator>>(std::list<T> &l)

    Reads l from the stream and returns a reference to the stream.