Qt 4.8
Public Types | Static Public Functions | List of all members
QConcatenable< QStringRef > Struct Template Reference

#include <qstringbuilder.h>

Inheritance diagram for QConcatenable< QStringRef >:
QAbstractConcatenable

Public Types

enum  { ExactSize = true }
 
typedef QString ConvertTo
 
typedef QStringRef type
 

Static Public Functions

static void appendTo (const QStringRef &a, QChar *&out)
 
static QT_ASCII_CAST_WARN void appendTo (const QStringRef &a, char *&out)
 
static int size (const QStringRef &a)
 

Additional Inherited Members

- Static Private Functions inherited from QAbstractConcatenable
static void convertFromAscii (const char *a, int len, QChar *&out)
 
static void convertFromAscii (char a, QChar *&out)
 
static void convertToAscii (const QChar *a, int len, char *&out)
 
static void convertToAscii (QChar a, char *&out)
 
static void convertToLatin1 (QChar a, char *&out)
 

Detailed Description

template<>
struct QConcatenable< QStringRef >

Definition at line 286 of file qstringbuilder.h.

Typedefs

◆ ConvertTo

Definition at line 289 of file qstringbuilder.h.

◆ type

Definition at line 288 of file qstringbuilder.h.

Enumerations

◆ anonymous enum

anonymous enum
Enumerator
ExactSize 

Definition at line 290 of file qstringbuilder.h.

Functions

◆ appendTo() [1/2]

static void QConcatenable< QStringRef >::appendTo ( const QStringRef a,
QChar *&  out 
)
inlinestatic

Definition at line 292 of file qstringbuilder.h.

293  {
294  const int n = a.size();
295  memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n);
296  out += n;
297  }
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
const QChar * constData() const
Same as unicode().
Definition: qstring.h:1159
int size() const
Returns the number of characters referred to by the string reference.
Definition: qstring.h:1114

◆ appendTo() [2/2]

static QT_ASCII_CAST_WARN void QConcatenable< QStringRef >::appendTo ( const QStringRef a,
char *&  out 
)
inlinestatic

Definition at line 299 of file qstringbuilder.h.

300  { convertToAscii(a.constData(), a.length(), out); }
int length() const
Returns the number of characters referred to by the string reference.
Definition: qstring.h:1116
static void convertToAscii(const QChar *a, int len, char *&out)
const QChar * constData() const
Same as unicode().
Definition: qstring.h:1159

◆ size()

static int QConcatenable< QStringRef >::size ( const QStringRef a)
inlinestatic

Definition at line 291 of file qstringbuilder.h.

291 { return a.size(); }
int size() const
Returns the number of characters referred to by the string reference.
Definition: qstring.h:1114

The documentation for this struct was generated from the following file: