Skip to content

Commit

Permalink
Add sip subclass code for QgsProcessingAlgorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 10, 2017
1 parent 326d6f5 commit 2b8e067
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/core/processing/qgsprocessingalgorithm.sip
Expand Up @@ -11,6 +11,11 @@



%ModuleHeaderCode
#include <qgsprocessingmodelalgorithm.h>
%End


class QgsProcessingAlgorithm
{
%Docstring
Expand All @@ -20,6 +25,13 @@ class QgsProcessingAlgorithm

%TypeHeaderCode
#include "qgsprocessingalgorithm.h"
%End

%ConvertToSubClassCode
if ( dynamic_cast< QgsProcessingModelAlgorithm * >( sipCpp ) != NULL )
sipType = sipType_QgsProcessingModelAlgorithm;
else
sipType = sipType_QgsProcessingAlgorithm;
%End
public:

Expand Down
17 changes: 17 additions & 0 deletions src/core/processing/qgsprocessingalgorithm.h
Expand Up @@ -33,6 +33,13 @@ class QgsFeatureSink;
class QgsProcessingFeedback;


#ifdef SIP_RUN
% ModuleHeaderCode
#include <qgsprocessingmodelalgorithm.h>
% End
#endif


/**
* \class QgsProcessingAlgorithm
* \ingroup core
Expand All @@ -41,6 +48,16 @@ class QgsProcessingFeedback;
*/
class CORE_EXPORT QgsProcessingAlgorithm
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( dynamic_cast< QgsProcessingModelAlgorithm * >( sipCpp ) != NULL )
sipType = sipType_QgsProcessingModelAlgorithm;
else
sipType = sipType_QgsProcessingAlgorithm;
SIP_END
#endif

public:

//! Flags indicating how and when an algorithm operates and should be exposed to users
Expand Down

0 comments on commit 2b8e067

Please sign in to comment.