QGIS/python/core/auto_generated/qgsoptional.sip.in
Nyall Dawson 2f4e5f0269 Mark QgsOptional bool operator as explicit
And reimplement for Python
2024-10-16 10:51:47 +10:00

82 lines
2.3 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptional.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
template<T>
class QgsOptional
{
%Docstring(signature="appended")
:py:class:`QgsOptional` is a container for other classes and adds an additional enabled/disabled flag.
Often it is used for configuration options which can be enabled or disabled but also have
more internal configuration information that should not be lost when disabling and re-enabling.
.. note::
For Python you need to use implementations for specific template classes
.. note::
Not available in Python bindings (although SIP file is present for specific implementations).
%End
%TypeHeaderCode
#include "qgsoptional.h"
%End
public:
QgsOptional();
%Docstring
A QgsOptional is disabled by default if default constructed.
%End
QgsOptional( const T &data );
%Docstring
A QgsOptional is enabled by default if constructed with payload.
%End
QgsOptional( const T &data, bool enabled );
%Docstring
A QgsOptional constructed with enabled status and data
%End
bool operator== ( const QgsOptional<T> &other ) const;
bool enabled() const;
%Docstring
Check if this optional is enabled
%End
void setEnabled( bool enabled );
%Docstring
Set if this optional is enabled
%End
T data() const;
%Docstring
Access the payload data
%End
void setData( const T &data );
%Docstring
Set the payload data
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptional.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/