QGIS/python/core/auto_generated/qgsoptional.sip.in

94 lines
2.4 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptional.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
template<T>
class QgsOptional
{
%Docstring
QgsOptional is a container for other classes and adds an additional enabled/disabled flag.
2017-12-15 10:36:55 -04:00
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.
2017-05-19 11:36:57 +02:00
.. note::
For Python you need to use implementations for specific template classes
2017-12-15 10:36:55 -04:00
2017-05-19 11:36:57 +02:00
.. note::
Not available in Python bindings (although SIP file is present for specific implementations).
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsoptional.h"
%End
public:
QgsOptional();
%Docstring
2017-12-15 10:36:55 -04:00
A QgsOptional is disabled by default if default constructed.
%End
QgsOptional( const T &data );
%Docstring
2017-12-15 10:36:55 -04:00
A QgsOptional is enabled by default if constructed with payload.
%End
QgsOptional( const T &data, bool enabled );
%Docstring
2017-12-15 10:36:55 -04:00
A QgsOptional constructed with enabled status and data
%End
bool operator== ( const QgsOptional<T> &other ) const;
operator bool() const;
bool enabled() const;
%Docstring
2017-12-15 10:36:55 -04:00
Check if this optional is enabled
.. versionadded:: 3.0
%End
void setEnabled( bool enabled );
%Docstring
2017-12-15 10:36:55 -04:00
Set if this optional is enabled
.. versionadded:: 3.0
%End
T data() const;
%Docstring
2017-12-15 10:36:55 -04:00
Access the payload data
.. versionadded:: 3.0
%End
void setData( const T &data );
%Docstring
2017-12-15 10:36:55 -04:00
Set the payload data
.. versionadded:: 3.0
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptional.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/