QGIS/python/core/auto_generated/geometry/qgsmulticurve.sip.in
Alessandro Pasotti 63711510b6 Dear Qt, I love you but ...
... you are too slow and QJson API is so ugly.

Now using this wonderful json lib:
https://github.com/nlohmann/json

Results in release mode (QJson tests are not shown but
QJson was even slower than string concat).

PASS   : TestQgsJsonUtils::testExportAttributesJson(Use json)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use json":
     0.0022 msecs per iteration (total: 75, iterations: 32768)
PASS   : TestQgsJsonUtils::testExportAttributesJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use old string concat":
     0.0032 msecs per iteration (total: 54, iterations: 16384)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use json)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use json":
     0.011 msecs per iteration (total: 96, iterations: 8192)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use old string concat":
     0.015 msecs per iteration (total: 64, iterations: 4096)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use json)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use json":
     0.76 msecs per iteration (total: 98, iterations: 128)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use old string concat":
     0.85 msecs per iteration (total: 55, iterations: 64)
PASS   : TestQgsJsonUtils::cleanupTestCase()
2019-04-18 17:04:30 +02:00

78 lines
2.6 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsmulticurve.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMultiCurve: QgsGeometryCollection
{
%Docstring
Multi curve geometry collection.
.. versionadded:: 2.10
%End
%TypeHeaderCode
#include "qgsmulticurve.h"
%End
public:
QgsMultiCurve();
virtual QString geometryType() const;
virtual QgsMultiCurve *clone() const /Factory/;
virtual void clear();
virtual QgsMultiCurve *toCurveType() const /Factory/;
virtual bool fromWkt( const QString &wkt );
virtual QDomElement asGml2( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;
virtual QDomElement asGml3( QDomDocument &doc, int precision = 17, const QString &ns = "gml", QgsAbstractGeometry::AxisOrder axisOrder = QgsAbstractGeometry::AxisOrder::XY ) const;
virtual QString asJson( int precision = 17 ) const;
virtual bool addGeometry( QgsAbstractGeometry *g /Transfer/ );
virtual bool insertGeometry( QgsAbstractGeometry *g /Transfer/, int index );
QgsMultiCurve *reversed() const /Factory/;
%Docstring
Returns a copy of the multi curve, where each component curve has had its line direction reversed.
.. versionadded:: 2.14
%End
virtual QgsAbstractGeometry *boundary() const /Factory/;
virtual QgsMultiCurve *createEmptyWithSameType() const /Factory/;
SIP_PYOBJECT __repr__();
%MethodCode
QString wkt = sipCpp->asWkt();
if ( wkt.length() > 1000 )
wkt = wkt.left( 1000 ) + QStringLiteral( "..." );
QString str = QStringLiteral( "<QgsMultiCurve: %1>" ).arg( wkt );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsmulticurve.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/