63#define ALIB_QTCHAR alib::characters::TypeBySize<2>
64#define ALIB_QTCHAR_4 alib::characters::TypeBySize<4>
67template<>
struct ArrayTraits<QStringView, ALIB_QTCHAR>
71 static const ALIB_QTCHAR*
Buffer (QStringView
const & src) {
return reinterpret_cast<const ALIB_QTCHAR*
>(src.data()); }
73 static QStringView
Construct(
const ALIB_QTCHAR* b,
integer l ) {
return QStringView( b, qsizetype(l) ); }
80 static const ALIB_QTCHAR*
Buffer (QStringView
const & src) {
return reinterpret_cast<const ALIB_QTCHAR*
>(src.data()); }
82 static QStringView
Construct(
const ALIB_QTCHAR* b,
integer l ) {
return QStringView( b, qsizetype(l) ); }
90 static const ALIB_QTCHAR*
Buffer (QString
const & src) {
return reinterpret_cast<const ALIB_QTCHAR*
>(src.data()); }
92 static QString
Construct(
const ALIB_QTCHAR* b,
integer l ) {
return QString(
reinterpret_cast<const QChar*
>(b),
int(l) ); }
99 static const ALIB_QTCHAR*
Buffer (QString
const & src) {
return reinterpret_cast<const ALIB_QTCHAR*
>(src.utf16()); }
101 static QString
Construct(
const ALIB_QTCHAR* b,
integer l ) {
return QString(
reinterpret_cast<const QChar*
>(b),
int(l) ); }
109 static const nchar*
Buffer (QLatin1String
const & src) {
return src.data(); }
118 static const nchar*
Buffer (QLatin1String
const & src) {
return reinterpret_cast<const nchar*
>(src.data()); }
128 static const nchar*
Buffer (QByteArray
const & src) {
return src.data(); }
137 static const nchar*
Buffer (QByteArray
const & src) {
return reinterpret_cast<const nchar*
>(src.data()); }
143template<>
struct ArrayTraits<QVector<uint>, ALIB_QTCHAR_4>
147 static const ALIB_QTCHAR_4*
Buffer (QVector<uint>
const & src) {
return reinterpret_cast<const ALIB_QTCHAR_4*
>(src.data()); }
151 QVector<uint> result;
152 result.reserve(
int(l) );
153 const ALIB_QTCHAR_4* end= b + l;
155 result.append( uint( *b++ ) );
164 static const ALIB_QTCHAR_4*
Buffer (QVector<uint>
const & src) {
return reinterpret_cast<const ALIB_QTCHAR_4*
>(src.data()); }
168 QVector<uint> result;
169 result.reserve(
int(l) );
170 const ALIB_QTCHAR_4* end= b + l;
172 result.append( uint(*b++) );