stringimpl.h 726 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#ifndef STRINGIMPL_H
#define STRINGIMPL_H

#include <qstring.h>
#include "doxmlintf.h"

class StringImpl : public QString, public IString
{
  public:
    StringImpl() {}
    StringImpl(const QString &str) : QString(str) {}
12 13
    StringImpl &operator=(const QString &str) 
    { QString::operator=(str); return *this; }
14 15 16 17 18
    virtual ~StringImpl() {}

    // IString 
    const char *latin1() const 
    { return QString::latin1(); }
19 20
    const char *utf8() const 
    { return QString::utf8(); }
21 22 23 24 25 26 27 28 29 30
    unsigned short unicodeCharAt(int index) const 
    { return QString::unicode()[index].unicode(); } 
    bool isEmpty() const 
    { return QString::isEmpty(); }
    int length() const 
    { return QString::length(); }
};

#endif