mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
[sip] Implement MappedType for unique_ptr to Python conversion
This commit is contained in:
parent
f4c1c56a1a
commit
596ecbee9c
@ -1242,6 +1242,24 @@ which are not wrapped by PyQt:
|
||||
%End
|
||||
};
|
||||
|
||||
template <TYPE>
|
||||
%MappedType std::unique_ptr< TYPE > /NoRelease,AllowNone,TypeHint="Optional[TYPE]",TypeHintValue="TYPE"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <memory>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
const sipTypeDef *sip_type = sipFindType("TYPE*");
|
||||
return sipConvertFromNewType(sipCpp->release(), sip_type, NULL);
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// only one way for now...
|
||||
return 0;
|
||||
%End
|
||||
};
|
||||
|
||||
template <TYPE>
|
||||
%MappedType QVector< QVector<TYPE> >
|
||||
{
|
||||
|
@ -1241,6 +1241,25 @@ which are not wrapped by PyQt:
|
||||
%End
|
||||
};
|
||||
|
||||
template <TYPE>
|
||||
%MappedType std::unique_ptr< TYPE > /NoRelease,AllowNone,TypeHint="Optional[TYPE]",TypeHintValue="TYPE"/
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include <memory>
|
||||
%End
|
||||
|
||||
%ConvertFromTypeCode
|
||||
const sipTypeDef *sip_type = sipFindType("TYPE*");
|
||||
return sipConvertFromNewType(sipCpp->release(), sip_type, NULL);
|
||||
%End
|
||||
|
||||
%ConvertToTypeCode
|
||||
// only one way for now...
|
||||
return 0;
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
template <TYPE>
|
||||
%MappedType QVector< QVector<TYPE> >
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user