1 /**************************************************************************** 2 ** 3 ** DQt - D bindings for the Qt Toolkit 4 ** 5 ** GNU Lesser General Public License Usage 6 ** This file may be used under the terms of the GNU Lesser 7 ** General Public License version 3 as published by the Free Software 8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 9 ** packaging of this file. Please review the following information to 10 ** ensure the GNU Lesser General Public License version 3 requirements 11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 12 ** 13 ****************************************************************************/ 14 module qt.core.bytearraylist; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.bytearray; 19 import qt.core.list; 20 import qt.core.metatype; 21 import qt.helpers; 22 23 /+ #ifndef QBYTEARRAYLIST_H +/ 24 /+ #define QBYTEARRAYLIST_H 25 26 27 #if !defined(QT_NO_JAVA_STYLE_ITERATORS) 28 typedef QListIterator<QByteArray> QByteArrayListIterator; 29 typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator; 30 #endif 31 32 #ifndef Q_CLANG_QDOC +/ 33 alias QByteArrayList = QList!(QByteArray); 34 35 extern(C++, "QtPrivate") { 36 QByteArray /+ Q_CORE_EXPORT +/ QByteArrayList_join(const(QByteArrayList)* that, const(char)* separator, int separatorLength); 37 int /+ Q_CORE_EXPORT +/ QByteArrayList_indexOf(const(QByteArrayList)* that, const(char)* needle, int from); 38 } 39 /+ #endif 40 41 #ifdef Q_CLANG_QDOC 42 class QByteArrayList : public QList<QByteArray> 43 #else 44 template <> struct QListSpecialMethods<QByteArray> 45 #endif 46 { 47 #ifndef Q_CLANG_QDOC 48 protected: 49 ~QListSpecialMethods() = default; 50 #endif 51 public: 52 inline QByteArray join() const 53 { return QtPrivate::QByteArrayList_join(self(), nullptr, 0); } 54 inline QByteArray join(const QByteArray &sep) const 55 { return QtPrivate::QByteArrayList_join(self(), sep.constData(), sep.size()); } 56 inline QByteArray join(char sep) const 57 { return QtPrivate::QByteArrayList_join(self(), &sep, 1); } 58 59 inline int indexOf(const char *needle, int from = 0) const 60 { return QtPrivate::QByteArrayList_indexOf(self(), needle, from); } 61 62 private: 63 typedef QList<QByteArray> Self; 64 Self *self() { return static_cast<Self *>(this); } 65 const Self *self() const { return static_cast<const Self *>(this); } 66 }; +/ 67 68 69 /+ #endif +/ // QBYTEARRAYLIST_H 70 71 alias QByteArrayList__1 = QList!(QByteArray); 72 /+ typedef QList<QByteArray> QByteArrayList; +/ 73