/***************************************************************************
  qgis_sip - QGIS SIP Macros

 ---------------------
 begin                : 4.5.2017
 copyright            : (C) 2017 by Denis Rouzaud
 email                : denis.rouzaud@gmail.com
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef QGIS_SIP_H
#define QGIS_SIP_H

/*
 * if written, the SIP file will not be generated automatically
 * or can be also defined directly in the file (to avoid including this)
 */

/*
 * the module will be included if the condition is met
 */
#define SIP_IF_MODULE( condition )


/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-Transfer
 *
 * Example QgsVectorLayer::setDiagramRenderer
 */
#define SIP_TRANSFER


/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-GetWrapper
 *
 */
#define SIP_GETWRAPPER

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-TransferBack
 */
#define SIP_TRANSFERBACK

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-TransferThis
 */
#define SIP_TRANSFERTHIS

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-Out
 */
#define SIP_OUT

/*
 * Alternative to SIP_OUT for methods with manual SIP MethodCode, where only the docstring needs to be
 * considered for the output argument.
 *
 * No /Out/ annotation will be added to the SIP bindings.
 */
#define SIP_DOCSTRING_OUT

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-In
 */
#define SIP_IN

/*
 * Combination of
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-In
 * and
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-Out
 */
#define SIP_INOUT

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-Factory
 */
#define SIP_FACTORY

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#class-annotation-PyName
 */
#define SIP_PYNAME( name )

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-KeepReference
 */
#define SIP_KEEPREFERENCE

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-Array
 */
#define SIP_ARRAY

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-ArraySize
 */
#define SIP_ARRAYSIZE

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#class-annotation-NoDefaultCtors
 */
#define SIP_NODEFAULTCTORS

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-Deprecated
 */
#define SIP_DEPRECATED

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-Constrained
 */
#define SIP_CONSTRAINED

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#class-annotation-External
 */
#define SIP_EXTERNAL

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#argument-annotation-AllowNone
 */
#define SIP_ALLOWNONE

/*
  * discard line
  */
#define SIP_SKIP

/*
  * force a private line to be written
  */
#define SIP_FORCE

/*
 * change the method access to private
 */
#define SIP_MAKE_PRIVATE

/*
  * specify an alternative type for SIP argument or return value
  */
#define SIP_PYALTERNATIVETYPE( type )

/*
  * specify an alternative default value for SIP argument
  */
#define SIP_PYARGDEFAULT( value )

/*
  * remove argument in SIP method
  */
#define SIP_PYARGREMOVE

/*
 * remove argument in SIP method only for Qt version >= 6
 */
#define SIP_PYARGREMOVE6

/*
 * rename argument in SIP method
 */
#define SIP_PYARGRENAME( pyname )

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-ReleaseGIL
 */
#define SIP_RELEASEGIL

/*
 * https://python-sip.readthedocs.io/en/stable/annotations.html#function-annotation-HoldGIL
 */
#define SIP_HOLDGIL

/*
 * Will insert a `%Feature feature` directive in sip files
 */
#define SIP_FEATURE( feature )

/*
 * Will insert a `%If feature` directive in sip files
 */
#define SIP_IF_FEATURE( feature )

/*
 * Will place the current line with an `%If feature` directive in sip file
 */
#define SIP_WHEN_FEATURE( feature )

/*
 * Convert to subclass code
 */
#define SIP_CONVERT_TO_SUBCLASS_CODE( code )

/*
 * Virtual error handler (/VirtualErrorHandler/)
 */
#define SIP_VIRTUALERRORHANDLER( name )

/*
 * Throw - adds deprecated c++ throw calls for sip. Required for sip to add appropriate
 * try/catch blocks around call and catch the correct exception, otherwise only
 * unknown generic exceptions are available for Python code.
 */
#define SIP_THROW( name, ... )

/*
 * Will insert a `%End` directive in sip files
 */
#define SIP_END

/*
 * Class level annotation for abstract classes
 */
#define SIP_ABSTRACT

/*
 * Virtual catcher code
 */
#define SIP_VIRTUAL_CATCHER_CODE( code )

/*
 * Force documentation of templates
 * Available for SIP 4.19.7+
 */
#define SIP_DOC_TEMPLATE

/*
 * Specifies the type of the value returned by the function as it will appear in any
 * generated docstrings and PEP 484 type hints. It is usually used with results of type
 * SIP_PYOBJECT to provide a more specific type.
 * Available for SIP 4.18+
 */
#define SIP_TYPEHINT( type )

/*
 * Define Python special method (bool, repr, etc.) using the given method or code
 * sipify.py will create a dedicated python file named according to the class
 * and located in python/{module}/auto_additions/{classname}.py
 * a simple method name can be provided (e.g. isValid) and sipify will create the proper code
 * or some Python code can be provided:
 *
 * SIP_PYTHON_SPECIAL_BOOL( isValid )
 * => sipify => MyClass.__bool__ = lambda self: self.isValid()
 *
 * SIP_PYTHON_SPECIAL_REPR( "'<MyClass {}>'format(self.toString())'" )
 * => sipify => MyClass.__repr__ = lambda self: '<MyClass {}>'format(self.toString())'
 */
#define SIP_PYTHON_SPECIAL_BOOL( method_or_code )
#define SIP_PYTHON_SPECIAL_REPR( method_or_code )

/*
 * If one reformat an enum to a scope based enum
 * sipify will take care of monkey patching to keep
 * API compatibility.
 * If OUTSIDE_CLASS is defined, the enum has been unnested
 * from the class, and it will be used for monkey patching
 * e.g. QgsMapLayer.VectorLayer = QgsMapLayerType.VectorLayer
 * These macros should be removed in QGIS 5
 */
#define SIP_MONKEYPATCH_SCOPEENUM
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST( OUTSIDE_CLASS, FORMERNAME )
#define SIP_MONKEYPATCH_FLAGS_UNNEST( OUTSIDE_CLASS, FORMERNAME )
#define SIP_MONKEYPATCH_COMPAT_NAME( FORMERNAME )

/*
 * Directive to define the base type for a enum
 */
#define SIP_ENUM_BASETYPE( type )

/*
 * Directive to define a Python property;
 */
#define SIP_PROPERTY( name, getter, setter )

/*
 * Directive to indicate that following code is only available with Qt 5 version
 */
#define SIP_PYQT5_RUN

/*
 * Adds an include in the type header code
 */
#define SIP_TYPEHEADER_INCLUDE( file )

/*
 * Inserts sip conversion code for QList<class_name::enum_name>, where class_name::enum_name is a c++ enum.
 *
 * Extra arguments can contain extra headers to include in the conversion code.
 */
#define SIP_INSERT_QLIST_ENUM_CONVERSION_CODE( class_name, ... )

#define SIP_NO_FILE

#endif // QGIS_SIP_H
