-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sipify] implement template inheritance
- Loading branch information
Showing
8 changed files
with
155 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/************************************************************************ | ||
* 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. | ||
|
||
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. | ||
|
||
.. versionadded:: 3.0 | ||
%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; | ||
|
||
operator bool() const; | ||
%Docstring | ||
Boolean operator. Will return true if this optional is enabled. | ||
%End | ||
|
||
bool enabled() const; | ||
%Docstring | ||
Check if this optional is enabled | ||
|
||
.. versionadded:: 3.0 | ||
:rtype: bool | ||
%End | ||
|
||
void setEnabled( bool enabled ); | ||
%Docstring | ||
Set if this optional is enabled | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
|
||
T data() const; | ||
%Docstring | ||
Access the payload data | ||
|
||
.. versionadded:: 3.0 | ||
:rtype: T | ||
%End | ||
|
||
void setData( const T &data ); | ||
%Docstring | ||
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 * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.