Last active
January 22, 2019 17:06
-
-
Save m-kuhn/368c017f05183df707ce054c2f431830 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QgsAbstractGeometry | |
{ | |
%ConvertToSubClassCode | |
if ( qgsgeometry_cast<QgsPoint *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsPoint; | |
else if ( qgsgeometry_cast<QgsLineString *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsLineString; | |
else if ( qgsgeometry_cast<QgsCircularString *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsCircularString; | |
else if ( qgsgeometry_cast<QgsCompoundCurve *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsCompoundCurve; | |
else if ( qgsgeometry_cast<QgsTriangle *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsTriangle; | |
else if ( qgsgeometry_cast<QgsPolygon *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsPolygon; | |
else if ( qgsgeometry_cast<QgsCurvePolygon *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsCurvePolygon; | |
else if ( qgsgeometry_cast<QgsMultiPoint *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsMultiPoint; | |
else if ( qgsgeometry_cast<QgsMultiLineString *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsMultiLineString; | |
else if ( qgsgeometry_cast<QgsMultiPolygon *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsMultiPolygon; | |
else if ( qgsgeometry_cast<QgsMultiSurface *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsMultiSurface; | |
else if ( qgsgeometry_cast<QgsMultiCurve *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsMultiCurve; | |
else if ( qgsgeometry_cast<QgsGeometryCollection *>( sipCpp ) != nullptr ) | |
sipType = sipType_QgsGeometryCollection; | |
else | |
sipType = 0; | |
%End | |
public: | |
static const QMetaObject staticMetaObject; | |
virtual ~QgsAbstractGeometry(); | |
virtual QgsAbstractGeometry *clone() const = 0 /Factory/; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implicitly shared wrapper around QgsAbstractGeometry and subtypes | |
*/ | |
class QgsGeometry | |
{ | |
public: | |
static const QMetaObject staticMetaObject; | |
explicit QgsGeometry( QgsAbstractGeometry *geom /Transfer/ ); | |
const QgsAbstractGeometry *constGet() const; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QgsGeometryCollection: QgsAbstractGeometry | |
{ | |
public: | |
static const QMetaObject staticMetaObject; | |
QgsGeometryCollection(); | |
virtual QgsGeometryCollection *clone() const /Factory/; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QgsMultiPolygon: QgsGeometryCollection | |
{ | |
public: | |
static const QMetaObject staticMetaObject; | |
QgsMultiPolygon(); | |
virtual QgsMultiPolygon *clone() const /Factory/; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class QgsPoint: QgsAbstractGeometry | |
{ | |
public: | |
static const QMetaObject staticMetaObject; | |
QgsPoint(; | |
virtual QgsPoint *clone() const /Factory/; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment