39 mutable unsigned char *mP;
40 unsigned char *mStart;
43 void verifyBound(
int size )
const;
45 template<
typename T>
void read( T& v )
const 47 verifyBound(
sizeof v );
48 memcpy( &v, mP,
sizeof v );
52 template<
typename T>
void write( T& v )
const 54 verifyBound(
sizeof v );
55 memcpy( mP, &v,
sizeof v );
78 inline void operator+=(
int n ) { verifyBound( n ); mP += n; }
80 inline operator unsigned char *()
const {
return mP; }
81 inline int size()
const {
return mEnd - mStart; }
92 mutable unsigned char *mP;
94 mutable bool mEndianSwap;
96 void verifyBound(
int size )
const;
98 template<
typename T>
void read( T& v )
const 100 verifyBound(
sizeof v );
101 memcpy( &v, mP,
sizeof( v ) );
117 inline void operator+=(
int n ) { verifyBound( n ); mP += n; }
120 inline operator const unsigned char *()
const {
return mP; }
124 #endif // QGSWKBPTR_H static void endian_swap(T &value)
Swap the endianness of the specified value.
QgsWkbException(QString const &what)
const QgsConstWkbPtr & operator>>(char &v) const
const QgsConstWkbPtr & operator>>(double &v) const
const QgsWkbPtr & operator>>(int &v) const
WkbType
Used for symbology operations.
const QgsWkbPtr & operator>>(float &r) const
const QgsConstWkbPtr & operator>>(unsigned int &v) const
QgsWkbPtr & operator<<(const int &v)
QgsWkbPtr & operator<<(const QgsWKBTypes::Type &v)
QgsWkbPtr & operator<<(const double &v)
QgsWkbPtr & operator<<(const QGis::WkbType &v)
const QgsWkbPtr & operator>>(double &v) const
const QgsWkbPtr & operator>>(char &v) const
const QgsWkbPtr & operator>>(QGis::WkbType &v) const
const QgsConstWkbPtr & operator>>(int &v) const
QgsWkbPtr & operator<<(const float &r)
QgsWkbPtr & operator<<(const unsigned int &v)
const QgsWkbPtr & operator>>(unsigned int &v) const
const QgsConstWkbPtr & operator>>(float &r) const
Defines a qgis exception class.
QgsWkbPtr & operator<<(const char &v)
const QgsWkbPtr & operator>>(QgsWKBTypes::Type &v) const