Qt 4.8
Classes | Enumerations | Functions | Variables
qxmlstream.cpp File Reference
#include "QtCore/qxmlstream.h"
#include "qxmlutils_p.h"
#include <qdebug.h>
#include <qfile.h>
#include <stdio.h>
#include <qtextcodec.h>
#include <qstack.h>
#include <qbuffer.h>
#include <qcoreapplication.h>
#include "qxmlstream_p.h"

Go to the source code of this file.

Classes

class  QXmlStreamWriterPrivate
 

Enumerations

enum  NameChar {
  NameBeginning, NameNotBeginning, NotName, NameBeginning,
  NameNotBeginning, NotName
}
 

Functions

static NameChar fastDetermineNameChar (QChar ch)
 

Variables

static const char Begi = static_cast<char>(NameBeginning)
 
static const char nameCharTable [128]
 
static const char NotN = static_cast<char>(NotName)
 
static const char NtBg = static_cast<char>(NameNotBeginning)
 
static const short QXmlStreamReader_tokenTypeString_indices []
 
static const char QXmlStreamReader_tokenTypeString_string []
 

Enumeration Type Documentation

◆ NameChar

enum NameChar
Enumerator
NameBeginning 
NameNotBeginning 
NotName 
NameBeginning 
NameNotBeginning 
NotName 

Definition at line 1392 of file qxmlstream.cpp.

Function Documentation

◆ fastDetermineNameChar()

static NameChar fastDetermineNameChar ( QChar  ch)
inlinestatic

Definition at line 1426 of file qxmlstream.cpp.

Referenced by QXmlStreamReaderPrivate::fastScanNMTOKEN().

1427 {
1428  ushort uc = ch.unicode();
1429  if (!(uc & ~0x7f)) // uc < 128
1430  return static_cast<NameChar>(nameCharTable[uc]);
1431 
1432  QChar::Category cat = ch.category();
1433  // ### some these categories might be slightly wrong
1434  if ((cat >= QChar::Letter_Uppercase && cat <= QChar::Letter_Other)
1435  || cat == QChar::Number_Letter)
1436  return NameBeginning;
1437  if ((cat >= QChar::Number_DecimalDigit && cat <= QChar::Number_Other)
1438  || (cat >= QChar::Mark_NonSpacing && cat <= QChar::Mark_Enclosing))
1439  return NameNotBeginning;
1440  return NotName;
1441 }
Category
This enum maps the Unicode character categories.
Definition: qchar.h:106
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: qchar.h:251
Category category() const
Returns the character&#39;s category.
Definition: qchar.cpp:853
NameChar
unsigned short ushort
Definition: qglobal.h:995
static const char nameCharTable[128]

Variable Documentation

◆ Begi

const char Begi = static_cast<char>(NameBeginning)
static

Definition at line 1394 of file qxmlstream.cpp.

◆ nameCharTable

const char nameCharTable[128]
static
Initial value:

Definition at line 1398 of file qxmlstream.cpp.

Referenced by fastDetermineNameChar().

◆ NotN

const char NotN = static_cast<char>(NotName)
static

Definition at line 1396 of file qxmlstream.cpp.

◆ NtBg

const char NtBg = static_cast<char>(NameNotBeginning)
static

Definition at line 1395 of file qxmlstream.cpp.

◆ QXmlStreamReader_tokenTypeString_indices

const short QXmlStreamReader_tokenTypeString_indices[]
static
Initial value:
= {
0, 8, 16, 30, 42, 55, 66, 77, 85, 89, 105, 0
}

Definition at line 762 of file qxmlstream.cpp.

Referenced by QXmlStreamReader::tokenString().

◆ QXmlStreamReader_tokenTypeString_string

const char QXmlStreamReader_tokenTypeString_string[]
static
Initial value:
=
"NoToken\0"
"Invalid\0"
"StartDocument\0"
"EndDocument\0"
"StartElement\0"
"EndElement\0"
"Characters\0"
"Comment\0"
"DTD\0"
"EntityReference\0"
"ProcessingInstruction\0"

Definition at line 749 of file qxmlstream.cpp.

Referenced by QXmlStreamReader::tokenString().