45 mutable unsigned char *mP;
46 unsigned char *mStart;
49 void verifyBound(
int size )
const;
51 template<
typename T>
void read( T &v )
const
53 verifyBound(
sizeof v );
54 memcpy( &v, mP,
sizeof v );
58 template<
typename T>
void write( T &v )
const
60 verifyBound(
sizeof v );
61 memcpy( mP, &v,
sizeof v );
65 void write(
const QByteArray &data )
const
67 verifyBound( data.length() );
68 memcpy( mP, data.constData(), data.length() );
81#if (!defined(Q_OS_ANDROID) && !defined(Q_PROCESSOR_X86_32)) || (defined(Q_OS_ANDROID) && defined(__aarch64__))
98#if (!defined(Q_OS_ANDROID) && !defined(Q_PROCESSOR_X86_32)) || (defined(Q_OS_ANDROID) && defined(__aarch64__))
113 inline operator unsigned char *()
const {
return mP; }
SIP_SKIP
143 mutable unsigned char *
mP;
152 void verifyBound(
int size )
const SIP_SKIP;
160 verifyBound(
sizeof v );
161 memcpy( &v, mP,
sizeof( v ) );
192 inline operator const unsigned char *()
const {
return mP; }
SIP_SKIP
201 template<
typename T>
void endian_swap( T &value )
const SIP_SKIP
203 char *data =
reinterpret_cast<char *
>( &value );
204 const std::size_t n =
sizeof( value );
205 for ( std::size_t i = 0, m = n / 2; i < m; ++i )
207 std::swap( data[i], data[n - 1 - i] );
WkbType
The WKB type describes the number of dimensions a geometry has.
const QgsConstWkbPtr & operator>>(int &v) const
const QgsConstWkbPtr & operator>>(unsigned int &v) const
int remaining() const
remaining
void read(T &v) const
Read a value.
void operator-=(int n) const
void operator+=(int n) const
const QgsConstWkbPtr & operator>>(float &r) const
const QgsConstWkbPtr & operator>>(char &v) const
Defines a QGIS exception class.
Custom exception class for Wkb related exceptions.
QgsWkbException(QString const &what)
const QgsWkbPtr & operator>>(double &v) const
const QgsWkbPtr & operator>>(Qgis::WkbType &v) const
Reads a Qgis::WkbType enum value.
QgsWkbPtr & operator<<(Qgis::WkbType v)
Writes a WKB type value to the pointer.
int remaining() const
remaining
QgsWkbPtr & operator<<(const QByteArray &data)
Append data from a byte array.
QgsWkbPtr & operator<<(double v)
Writes a double to the pointer.
int writtenSize() const
writtenSize
const QgsWkbPtr & operator>>(unsigned int &v) const
Reads an unsigned integer value.
QgsWkbPtr & operator<<(int v)
Writes an int to the pointer.
const QgsWkbPtr & operator>>(float &r) const
const QgsWkbPtr & operator>>(qsizetype &r) const
Reads an integer value into a qsizetype.
void operator+=(int n) const
const QgsWkbPtr & operator>>(char &v) const
Reads an char value.
QgsWkbPtr & operator<<(qsizetype r)
Writes a size as int to the pointer.
QgsWkbPtr & operator<<(unsigned int v)
Writes an unsigned int to the pointer.
const QgsWkbPtr & operator>>(int &v) const
QgsWkbPtr & operator<<(float r)
Writes a float to the pointer.
QgsWkbPtr & operator<<(char v)
Writes a char to the pointer.
QDataStream & operator>>(QDataStream &in, QgsFeature &feature)
Reads a feature from stream in into feature. QGIS version compatibility is not guaranteed.