48 mutable unsigned char *mP;
49 unsigned char *mStart;
52 void verifyBound(
int size )
const;
54 template<
typename T>
void read( T &v )
const
56 verifyBound(
sizeof v );
57 memcpy( &v, mP,
sizeof v );
61 template<
typename T>
void write( T &v )
const
63 verifyBound(
sizeof v );
64 memcpy( mP, &v,
sizeof v );
68 void write(
const QByteArray &data )
const
70 verifyBound( data.length() );
71 memcpy( mP, data.constData(), data.length() );
183 inline operator unsigned char *()
const SIP_SKIP {
return mP; }
213 mutable unsigned char *
mP;
231 memcpy( &v,
mP,
sizeof( v ) );
286 inline operator const unsigned char *()
const SIP_SKIP {
return mP; }
295 template<
typename T>
void endian_swap( T &value )
const SIP_SKIP
297 char *data =
reinterpret_cast<char *
>( &value );
298 const std::size_t n =
sizeof( value );
299 const std::size_t m = n / 2;
300 for ( std::size_t i = 0; i < m; ++i )
302 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
QgsConstWkbPtr(const QByteArray &wkb)
Construct WKB pointer from QByteArray.
void read(T &v) const
Read a value.
void verifyBound(int size) const
Verify bounds.
void operator-=(int n) const
void operator+=(int n) const
const QgsConstWkbPtr & operator>>(float &r) const
const QgsConstWkbPtr & operator>>(char &v) const
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
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<<(qint64 r)
Writes a longlong as int to the pointer.
const QgsWkbPtr & operator>>(qint32 &v) const
Reads an integer value into a qint32.
const QgsWkbPtr & operator>>(qint64 &r) const
Reads an integer value into a longlong.
QgsWkbPtr & operator<<(Qgis::WkbType v)
Writes a WKB type value to the pointer.
int remaining() const
remaining
const QgsWkbPtr & operator>>(quint32 &v) const
Reads an unsigned integer value.
QgsWkbPtr & operator<<(const QByteArray &data)
Append data from a byte array.
QgsWkbPtr & operator<<(qint32 v)
Writes an int to the pointer.
QgsWkbPtr & operator<<(double v)
Writes a double to the pointer.
int writtenSize() const
writtenSize
const QgsWkbPtr & operator>>(float &r) const
QgsWkbPtr(QByteArray &wkb)
Construct WKB pointer from QByteArray.
QgsWkbPtr & operator<<(quint32 v)
Writes an unsigned int to the pointer.
void operator+=(int n) const
const QgsWkbPtr & operator>>(char &v) const
Reads an char value.
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.