Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
QCharRef Class Reference

The QCharRef class is a helper class for QString. More...

#include <qstring.h>

Public Member Functions

ushort unicode () const
 
char latin1 () const
 
QCharRef operator= (char c)
 
QCharRef operator= (uchar c)
 
QCharRef operator= (QChar c)
 
QCharRef operator= (const QCharRef &c)
 
QCharRef operator= (ushort rc)
 
QCharRef operator= (short rc)
 
QCharRef operator= (uint rc)
 
QCharRef operator= (int rc)
 
 operator QChar () const
 
bool isNull () const
 
bool isPrint () const
 
bool isPunct () const
 
bool isSpace () const
 
bool isMark () const
 
bool isLetter () const
 
bool isNumber () const
 
bool isLetterOrNumber ()
 
bool isDigit () const
 
int digitValue () const
 
QChar lower ()
 
QChar upper ()
 
QChar::Category category () const
 
QChar::Direction direction () const
 
QChar::Joining joining () const
 
bool mirrored () const
 
QChar mirroredChar () const
 
QString decomposition () const
 
QChar::Decomposition decompositionTag () const
 
uchar cell () const
 
uchar row () const
 

Private Member Functions

 QCharRef (QString *str, uint pos)
 

Private Attributes

QStrings
 
uint p
 

Friends

class QString
 

Detailed Description

The QCharRef class is a helper class for QString.

It provides the ability to work on characters in a QString in a natural fashion.

When you get an object of type QCharRef, you can assign to it, which will operate on the string from which you got it. That is its whole purpose in life. It becomes invalid once further modifications are made to the string: If you want to keep it, copy it into a QChar.

Most of the QChar member functions also exist in QCharRef. However, they are not explicitly documented here.

See also
QString::operator[]() QString::at() QChar

Definition at line 568 of file qstring.h.

Constructor & Destructor Documentation

QCharRef::QCharRef ( QString str,
uint  pos 
)
inlineprivate

Definition at line 572 of file qstring.h.

572 : s(*str), p(pos) { }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570

Member Function Documentation

QChar::Category QCharRef::category ( ) const
inline

Definition at line 609 of file qstring.h.

609 { return s.constref(p).category(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
Category category() const
Definition: qstring.cpp:11096
QChar constref(uint i) const
Definition: qstring.h:498
uchar QCharRef::cell ( ) const
inline

Definition at line 618 of file qstring.h.

618 { return s.constref(p).cell(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
uchar & cell()
Definition: qstring.h:167
QChar constref(uint i) const
Definition: qstring.h:498
QString QCharRef::decomposition ( ) const
inline

Definition at line 614 of file qstring.h.

614 { return s.constref(p).decomposition(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QString decomposition() const
Definition: qstring.cpp:11186
QChar::Decomposition QCharRef::decompositionTag ( ) const
inline

Definition at line 615 of file qstring.h.

615 { return s.constref(p).decompositionTag(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
Decomposition decompositionTag() const
Definition: qstring.cpp:11210
QChar constref(uint i) const
Definition: qstring.h:498
int QCharRef::digitValue ( ) const
inline

Definition at line 605 of file qstring.h.

605 { return s.constref(p).digitValue(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
int digitValue() const
Definition: qstring.cpp:11075
QChar::Direction QCharRef::direction ( ) const
inline

Definition at line 610 of file qstring.h.

610 { return s.constref(p).direction(); }
uint p
Definition: qstring.h:571
Direction direction() const
Definition: qstring.cpp:11114
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool QCharRef::isDigit ( ) const
inline

Definition at line 603 of file qstring.h.

603 { return s.constref(p).isDigit(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool isDigit() const
Definition: qstring.cpp:11066
bool QCharRef::isLetter ( ) const
inline

Definition at line 600 of file qstring.h.

600 { return s.constref(p).isLetter(); }
uint p
Definition: qstring.h:571
bool isLetter() const
Definition: qstring.cpp:11035
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool QCharRef::isLetterOrNumber ( )
inline

Definition at line 602 of file qstring.h.

602 { return s.constref(p).isLetterOrNumber(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool isLetterOrNumber() const
Definition: qstring.cpp:11055
bool QCharRef::isMark ( ) const
inline

Definition at line 599 of file qstring.h.

599 { return s.constref(p).isMark(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool isMark() const
Definition: qstring.cpp:11017
bool QCharRef::isNull ( ) const
inline

Definition at line 595 of file qstring.h.

595 { return unicode()==0; }
ushort unicode() const
Definition: qstring.h:579
bool QCharRef::isNumber ( ) const
inline

Definition at line 601 of file qstring.h.

601 { return s.constref(p).isNumber(); }
bool isNumber() const
Definition: qstring.cpp:11046
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool QCharRef::isPrint ( ) const
inline

Definition at line 596 of file qstring.h.

596 { return s.constref(p).isPrint(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool isPrint() const
Definition: qstring.cpp:10996
bool QCharRef::isPunct ( ) const
inline

Definition at line 597 of file qstring.h.

597 { return s.constref(p).isPunct(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool isPunct() const
Definition: qstring.cpp:11026
bool QCharRef::isSpace ( ) const
inline

Definition at line 598 of file qstring.h.

598 { return s.constref(p).isSpace(); }
uint p
Definition: qstring.h:571
bool isSpace() const
Definition: qstring.cpp:11006
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QChar::Joining QCharRef::joining ( ) const
inline

Definition at line 611 of file qstring.h.

611 { return s.constref(p).joining(); }
uint p
Definition: qstring.h:571
Joining joining() const
Definition: qstring.cpp:11132
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
char QCharRef::latin1 ( ) const
inline

Definition at line 580 of file qstring.h.

580 { return s.constref(p).latin1(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
char latin1() const
Definition: qstring.h:150
QChar QCharRef::lower ( )
inline

Definition at line 606 of file qstring.h.

606 { return s.constref(p).lower(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QChar lower() const
Definition: qstring.cpp:11229
bool QCharRef::mirrored ( ) const
inline

Definition at line 612 of file qstring.h.

612 { return s.constref(p).mirrored(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
bool mirrored() const
Definition: qstring.cpp:11149
QChar QCharRef::mirroredChar ( ) const
inline

Definition at line 613 of file qstring.h.

613 { return s.constref(p).mirroredChar(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QChar mirroredChar() const
Definition: qstring.cpp:11165
QCharRef::operator QChar ( ) const
inline

Definition at line 592 of file qstring.h.

592 { return s.constref(p); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QCharRef QCharRef::operator= ( char  c)
inline

Definition at line 583 of file qstring.h.

583 { s.ref(p)=c; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( uchar  c)
inline

Definition at line 584 of file qstring.h.

584 { s.ref(p)=c; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( QChar  c)
inline

Definition at line 585 of file qstring.h.

585 { s.ref(p)=c; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( const QCharRef c)
inline

Definition at line 586 of file qstring.h.

586 { s.ref(p)=c.unicode(); return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
ushort unicode() const
Definition: qstring.h:579
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( ushort  rc)
inline

Definition at line 587 of file qstring.h.

587 { s.ref(p)=rc; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( short  rc)
inline

Definition at line 588 of file qstring.h.

588 { s.ref(p)=rc; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( uint  rc)
inline

Definition at line 589 of file qstring.h.

589 { s.ref(p)=rc; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
QCharRef QCharRef::operator= ( int  rc)
inline

Definition at line 590 of file qstring.h.

590 { s.ref(p)=rc; return *this; }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar & ref(uint i)
Definition: qstring.h:500
uchar QCharRef::row ( ) const
inline

Definition at line 619 of file qstring.h.

619 { return s.constref(p).row(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
uchar & row()
Definition: qstring.h:168
ushort QCharRef::unicode ( ) const
inline

Definition at line 579 of file qstring.h.

579 { return s.constref(p).unicode(); }
uint p
Definition: qstring.h:571
ushort unicode() const
Definition: qstring.h:151
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QChar QCharRef::upper ( )
inline

Definition at line 607 of file qstring.h.

607 { return s.constref(p).upper(); }
uint p
Definition: qstring.h:571
QString & s
Definition: qstring.h:570
QChar constref(uint i) const
Definition: qstring.h:498
QChar upper() const
Definition: qstring.cpp:11248

Friends And Related Function Documentation

friend class QString
friend

Definition at line 569 of file qstring.h.

Member Data Documentation

uint QCharRef::p
private

Definition at line 571 of file qstring.h.

QString& QCharRef::s
private

Definition at line 570 of file qstring.h.


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