stringimpl.h
Go to the documentation of this file.
1 #ifndef STRINGIMPL_H
2 #define STRINGIMPL_H
3 
4 #include <qstring.h>
5 #include "doxmlintf.h"
6 
7 class StringImpl : public QString, public IString
8 {
9  public:
11  StringImpl(const QString &str) : QString(str) {}
13  { QString::operator=(str); return *this; }
14  virtual ~StringImpl() {}
15 
16  // IString
17  const char *latin1() const
18  { return QString::latin1(); }
19  const char *utf8() const
20  { return QString::utf8(); }
21  unsigned short unicodeCharAt(int index) const
22  { return QString::unicode()[index].unicode(); }
23  bool isEmpty() const
24  { return QString::isEmpty(); }
25  int length() const
26  { return QString::length(); }
27 };
28 
29 #endif
30 
const QChar * unicode() const
Definition: qstring.h:508
Read only interface to a string.
Definition: doxmlintf.h:42
bool isEmpty() const
Definition: qstring.h:682
ushort unicode() const
Definition: qstring.h:151
int length() const
Definition: stringimpl.h:25
StringImpl & operator=(const QString &str)
Definition: stringimpl.h:12
StringImpl(const QString &str)
Definition: stringimpl.h:11
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
const char * utf8() const
Definition: stringimpl.h:19
bool isEmpty() const
Definition: stringimpl.h:23
virtual ~StringImpl()
Definition: stringimpl.h:14
uint length() const
Definition: qstring.h:679
unsigned short unicodeCharAt(int index) const
Definition: stringimpl.h:21
QString & operator=(const QString &)
Definition: qstring.cpp:12402
const char * latin1() const
Definition: qstring.cpp:14457
const char * latin1() const
Definition: stringimpl.h:17
QCString utf8() const
Definition: qstring.cpp:14507
static QCString str
The interface to the object model provided by the XML parser library.