#include #include #include #include #include #include #include #include "qcollator.h" #include "gen_qcollator.h" extern "C" { extern void miqt_exec_callback(void* cb, int argc, void* argv); } QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other) { return new QCollatorSortKey(*other); } void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other) { self->operator=(*other); } void QCollatorSortKey_Swap(QCollatorSortKey* self, QCollatorSortKey* other) { self->swap(*other); } int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key) { return self->compare(*key); } void QCollatorSortKey_Delete(QCollatorSortKey* self) { delete self; } QCollator* QCollator_new() { return new QCollator(); } QCollator* QCollator_new2(QLocale* locale) { return new QCollator(*locale); } QCollator* QCollator_new3(QCollator* param1) { return new QCollator(*param1); } void QCollator_OperatorAssign(QCollator* self, QCollator* param1) { self->operator=(*param1); } void QCollator_Swap(QCollator* self, QCollator* other) { self->swap(*other); } void QCollator_SetLocale(QCollator* self, QLocale* locale) { self->setLocale(*locale); } QLocale* QCollator_Locale(const QCollator* self) { QLocale ret = self->locale(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QLocale(ret)); } uintptr_t QCollator_CaseSensitivity(const QCollator* self) { Qt::CaseSensitivity ret = self->caseSensitivity(); return static_cast(ret); } void QCollator_SetCaseSensitivity(QCollator* self, uintptr_t cs) { self->setCaseSensitivity(static_cast(cs)); } void QCollator_SetNumericMode(QCollator* self, bool on) { self->setNumericMode(on); } bool QCollator_NumericMode(const QCollator* self) { return self->numericMode(); } void QCollator_SetIgnorePunctuation(QCollator* self, bool on) { self->setIgnorePunctuation(on); } bool QCollator_IgnorePunctuation(const QCollator* self) { return self->ignorePunctuation(); } int QCollator_Compare(const QCollator* self, const char* s1, size_t s1_Strlen, const char* s2, size_t s2_Strlen) { QString s1_QString = QString::fromUtf8(s1, s1_Strlen); QString s2_QString = QString::fromUtf8(s2, s2_Strlen); return self->compare(s1_QString, s2_QString); } int QCollator_Compare3(const QCollator* self, QChar* s1, int len1, QChar* s2, int len2) { return self->compare(s1, static_cast(len1), s2, static_cast(len2)); } bool QCollator_OperatorCall(const QCollator* self, const char* s1, size_t s1_Strlen, const char* s2, size_t s2_Strlen) { QString s1_QString = QString::fromUtf8(s1, s1_Strlen); QString s2_QString = QString::fromUtf8(s2, s2_Strlen); return self->operator()(s1_QString, s2_QString); } QCollatorSortKey* QCollator_SortKey(const QCollator* self, const char* stringVal, size_t stringVal_Strlen) { QString stringVal_QString = QString::fromUtf8(stringVal, stringVal_Strlen); QCollatorSortKey ret = self->sortKey(stringVal_QString); // Copy-construct value returned type into heap-allocated copy return static_cast(new QCollatorSortKey(ret)); } void QCollator_Delete(QCollator* self) { delete self; }