Public Member Functions | Public Attributes

QStringBuilder< A, B > Class Template Reference

Search for all occurrences

Detailed Description

template<typename A, typename B>
class QStringBuilder< A, B >

Definition at line 96 of file qstringbuilder.h.

#include <qstringbuilder.h>

List of all members.

Public Member Functions

  QStringBuilder (const A &a_, const B &b_)
  operator QString () const
QByteArray  toLatin1 () const

Public Attributes

const A &  a
const B &  b

Constructor & Destructor Documentation

QStringBuilder ( const A &  a_,
const B &  b_ 
) [inline]

Definition at line 99 of file qstringbuilder.h.

: a(a_), b(b_) {}

Member Function Documentation

operator QString ( void  ) const [inline]

Definition at line 101 of file qstringbuilder.h.

    {
        const uint size = QConcatenable< QStringBuilder<A, B> >::size(*this);
        QString s(size, Qt::Uninitialized);

        QChar *d = s.data();
        const QChar * const start = d;
        QConcatenable< QStringBuilder<A, B> >::appendTo(*this, d);

        if (!QConcatenable< QStringBuilder<A, B> >::ExactSize && int(size) != d - start) {
            // this resize is necessary since we allocate a bit too much
            // when dealing with variable sized 8-bit encodings
            s.resize(d - start);
        }
        return s;
    }
QByteArray toLatin1 ( ) const [inline]

Definition at line 117 of file qstringbuilder.h.

{ return QString(*this).toLatin1(); }

Member Data Documentation

const A& a

Definition at line 119 of file qstringbuilder.h.

const B& b

Definition at line 120 of file qstringbuilder.h.


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