Qt 4.8
Public Functions | Properties | List of all members
QXmlStreamStringRef Class Reference

#include <qxmlstream.h>

Public Functions

void clear ()
 
 operator QStringRef () const
 
int position () const
 
 QXmlStreamStringRef ()
 
 QXmlStreamStringRef (const QStringRef &aString)
 
 QXmlStreamStringRef (const QString &aString)
 
int size () const
 
const QStringstring () const
 
 ~QXmlStreamStringRef ()
 

Properties

int m_position
 
int m_size
 
QString m_string
 

Detailed Description

Since
4.3
Warning
This function is not part of the public interface.

Definition at line 116 of file qxmlstream.h.

Constructors and Destructors

◆ QXmlStreamStringRef() [1/3]

QXmlStreamStringRef::QXmlStreamStringRef ( )
inline

Definition at line 120 of file qxmlstream.h.

◆ QXmlStreamStringRef() [2/3]

QXmlStreamStringRef::QXmlStreamStringRef ( const QStringRef aString)
inline

Definition at line 121 of file qxmlstream.h.

122  :m_string(aString.string()?*aString.string():QString()), m_position(aString.position()), m_size(aString.size()){}
The QString class provides a Unicode character string.
Definition: qstring.h:83
int size() const
Returns the number of characters referred to by the string reference.
Definition: qstring.h:1114
int position() const
Returns the starting position in the referenced string that is referred to by the string reference...
Definition: qstring.h:1113
const QString * string() const
Returns a pointer to the string referred to by the string reference, or 0 if it does not reference a ...
Definition: qstring.h:1112

◆ QXmlStreamStringRef() [3/3]

QXmlStreamStringRef::QXmlStreamStringRef ( const QString aString)
inline

Definition at line 123 of file qxmlstream.h.

123 :m_string(aString), m_position(0), m_size(aString.size()){}
int size() const
Returns the number of characters in this string.
Definition: qstring.h:102

◆ ~QXmlStreamStringRef()

QXmlStreamStringRef::~QXmlStreamStringRef ( )
inline

Definition at line 124 of file qxmlstream.h.

124 {}

Functions

◆ clear()

void QXmlStreamStringRef::clear ( )
inline

Definition at line 125 of file qxmlstream.h.

125 { m_string.clear(); m_position = m_size = 0; }
void clear()
Clears the contents of the string and makes it empty.
Definition: qstring.h:723

◆ operator QStringRef()

QXmlStreamStringRef::operator QStringRef ( ) const
inline

Definition at line 126 of file qxmlstream.h.

126 { return QStringRef(&m_string, m_position, m_size); }
The QStringRef class provides a thin wrapper around QString substrings.
Definition: qstring.h:1099

◆ position()

int QXmlStreamStringRef::position ( ) const
inline

Definition at line 128 of file qxmlstream.h.

Referenced by QXmlStreamAttribute::prefix().

128 { return m_position; }

◆ size()

int QXmlStreamStringRef::size ( ) const
inline

Definition at line 129 of file qxmlstream.h.

Referenced by QXmlStreamAttribute::prefix().

129 { return m_size; }

◆ string()

const QString* QXmlStreamStringRef::string ( ) const
inline

Definition at line 127 of file qxmlstream.h.

Referenced by QXmlStreamAttribute::prefix().

127 { return &m_string; }

Properties

◆ m_position

int QXmlStreamStringRef::m_position
private

Definition at line 118 of file qxmlstream.h.

◆ m_size

int QXmlStreamStringRef::m_size
private

Definition at line 118 of file qxmlstream.h.

◆ m_string

QString QXmlStreamStringRef::m_string
private

Definition at line 117 of file qxmlstream.h.


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