64 const char *
const range =
"0123456789ABCDEFabcdef";
66 const char *
const in = strchr(range, c.
unicode());
72 int digit = in - range;
83 const int len = lexical.
length();
92 "A value of type %1 must contain an even number of " 93 "digits. The value %2 does not.")
101 for(
int i = 0; i < len / 2; ++i)
106 if(p1 == -1 || p2 == -1)
111 "%1 is not valid as a value of type %2.")
116 val[i] =
static_cast<char>(p1 * 16 + p2);
130 static const char s_toHex[] =
"0123456789ABCDEF";
135 for(
int i = 0; i < len; ++i)
138 const unsigned char val =
static_cast<unsigned char>(
m_value.
at(i));
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QExplicitlySharedDataPointer< AtomicValue > Ptr
#define QT_END_NAMESPACE
This macro expands to.
ushort unicode() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString formatType(const NamePool::Ptr &np, const T &type)
Formats ItemType and SequenceType.
The QByteArray class provides an array of bytes.
int length() const
Returns the number of characters in this string.
static AtomicValue::Ptr createError(const QString &description=QString(), const ReportContext::ErrorCode=ReportContext::FORG0001)
static AtomicValue::Ptr fromLexical(const NamePool::Ptr &np, const QString &value)
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
virtual ItemType::Ptr type() const
Q_CORE_EXPORT QTextStream & hex(QTextStream &s)
void reserve(int size)
Attempts to allocate memory for at least size characters.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static qint8 fromHex(const QChar &c)
Returns -1 on invalid input.
QString trimmed() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end.
The namespace for the internal API of QtXmlPatterns.
static const char * data(const QByteArray &arr)
HexBinary(const QByteArray &val)
static QString formatData(const QString &data)
Contains functions used for formatting arguments, such as keywords and paths, in translated strings...
int count(char c) const
Returns the number of occurrences of character ch in the byte array.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
void resize(int size)
Sets the size of the byte array to size bytes.
static HexBinary::Ptr fromValue(const QByteArray &data)
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
virtual QString stringValue() const
char at(int i) const
Returns the character at index position i in the byte array.
Implements the value instance of the xs:base64Binary type.
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static const AtomicType::Ptr xsHexBinary