QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
18 #include "qgis_core.h"
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 QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
95 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
110 inline operator unsigned char *()
const {
return mP; }
SIP_SKIP
140 mutable unsigned char *
mP;
149 void verifyBound(
int size )
const SIP_SKIP;
157 verifyBound(
sizeof v );
158 memcpy( &v, mP,
sizeof( v ) );
189 inline operator const unsigned char *()
const {
return mP; }
SIP_SKIP
198 template<
typename T>
void endian_swap( T &value )
const SIP_SKIP
200 char *data =
reinterpret_cast<char *
>( &value );
201 const std::size_t n =
sizeof( value );
202 for ( std::size_t i = 0, m = n / 2; i < m; ++i )
204 std::swap( data[i], data[n - 1 - i] );
209 #endif // QGSWKBPTR_H
Defines a QGIS exception class.
QgsWkbPtr & operator<<(int v)
Writes an int to the pointer.
const QgsConstWkbPtr & operator>>(int &v) const
QgsWkbPtr & operator<<(const QByteArray &data)
Append data from a byte array.
const QgsWkbPtr & operator>>(int &v) const
const QgsWkbPtr & operator>>(QgsWkbTypes::Type &v) const
const QgsConstWkbPtr & operator>>(float &r) const
Type
The WKB type describes the number of dimensions a geometry has.
const QgsConstWkbPtr & operator>>(char &v) const
int remaining() const
remaining
QgsWkbTypes::Type mWkbType
QgsWkbPtr & operator<<(char v)
Writes a char to the pointer.
const QgsConstWkbPtr & operator>>(unsigned int &v) const
void operator-=(int n) const
const QgsWkbPtr & operator>>(float &r) const
QDataStream & operator>>(QDataStream &in, QgsFeature &feature)
Reads a feature from stream in into feature. QGIS version compatibility is not guaranteed.
Custom exception class for Wkb related exceptions.
QgsException(const QString &message)
Constructor for QgsException, with the specified error message.
QgsWkbPtr & operator<<(QgsWkbTypes::Type v)
Writes a WKB type value to the pointer.
void operator+=(int n) const
const QgsWkbPtr & operator>>(unsigned int &v) const
const QgsWkbPtr & operator>>(double &v) const
QDataStream & operator<<(QDataStream &out, const QgsFeature &feature)
Writes the feature to stream out. QGIS version compatibility is not guaranteed.
void operator+=(int n) const
int remaining() const
remaining
const QgsWkbPtr & operator>>(char &v) const
QgsWkbPtr & operator<<(double v)
Writes a double to the pointer.
int writtenSize() const
writtenSize
void read(T &v) const
Read a value.
QgsWkbPtr & operator<<(float r)
Writes a float to the pointer.