Implements the function fn:translate()
.
More...
#include <qstringvaluefns_p.h>
|
typedef QExplicitlySharedDataPointer< FunctionCall > | Ptr |
|
enum | CardinalityComputation { ProductOfCardinality,
UnionOfCardinality
} |
|
typedef QExplicitlySharedDataPointer< const Expression > | ConstPtr |
| A smart pointer wrapping const Expression instances. More...
|
|
enum | ID {
IDBooleanValue = 1,
IDCountFN,
IDEmptyFN,
IDExistsFN,
IDExpressionSequence,
IDGeneralComparison,
IDIfThenClause,
IDIgnorableExpression,
IDIntegerValue,
IDPositionFN,
IDStringValue,
IDValueComparison,
IDRangeVariableReference,
IDContextItem,
IDUserFunctionCallsite,
IDExpressionVariableReference,
IDAttributeConstructor,
IDUpperCaseFN,
IDLowerCaseFN,
IDFirstItemPredicate,
IDEmptySequence,
IDReturnOrderBy,
IDLetClause,
IDForClause,
IDPath,
IDNamespaceConstructor,
IDArgumentReference,
IDGenericPredicate,
IDAxisStep,
IDFloat,
IDCombineNodes,
IDUnresolvedVariableReference,
IDCardinalityVerifier
} |
|
typedef QList< Expression::Ptr > | List |
|
typedef QFlags< Property > | Properties |
|
enum | Property {
UseContextItem = 1,
DisableElimination = 1 << 1,
IsEvaluated = 1 << 2,
DisableTypingDeduction = 1 << 3,
EmptynessFollowsChild = 1 << 4,
RewriteToEmptyOnEmpty = 1 << 5,
RequiresFocus = 1 << 6,
AffectsOrderOnly = 1 << 7,
RequiresContextItem = (1 << 8) | RequiresFocus,
CreatesFocusForLast = 1 << 9,
LastOperandIsCollation = 1 << 10,
DependsOnLocalVariable = (1 << 11) | DisableElimination,
EvaluationCacheRedundant = (1 << 12),
IsNodeConstructor = 1 << 13,
RequiresCurrentItem = 1 << 14
} |
|
typedef QExplicitlySharedDataPointer< Expression > | Ptr |
| A smart pointer wrapping mutable Expression instances. More...
|
|
typedef ::QAbstractXmlForwardIterator< Expression::Ptr > | QAbstractXmlForwardIterator |
|
typedef QVector< Expression::Ptr > | Vector |
|
static void | rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context) |
|
QAtomicInt | ref |
|
template<CardinalityComputation suppliedCard> |
SequenceType::Ptr | operandsUnionType () const |
|
void | typeCheckOperands (const StaticContext::Ptr &context) |
|
| CppCastingHelper () |
|
Expression::List | m_operands |
|
Implements the function fn:translate()
.
- Author
- Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com
Definition at line 198 of file qstringvaluefns_p.h.
◆ evaluateSingleton()
Reimplemented from QPatternist::Expression.
Definition at line 287 of file qstringvaluefns.cpp.
295 const QString arg(item.stringValue());
297 if(mapString.isEmpty())
301 const int transLen = transString.
length();
302 const int argLen = arg.length();
308 for(
int i = 0; i < argLen; ++i)
310 const QChar argCh(arg.at(i));
311 const int mapPos = mapString.indexOf(argCh);
315 result[outI] = argCh;
319 else if(mapPos >= transLen)
322 const QChar transCh(transString.at(mapPos));
327 result[outI] = transCh;
Expression::List m_operands
int length() const
Returns the number of characters in this string.
The QString class provides a Unicode character string.
The QChar class provides a 16-bit Unicode character.
static AtomicString::Ptr fromValue(const QString &value)
void reserve(int size)
Attempts to allocate memory for at least size characters.
void truncate(int pos)
Truncates the string at the given position index.
const T & at(int i) const
Returns the item at index position i in the list.
QString stringValue() const
Returns the string value of this Item.
T & first()
Returns a reference to the first item in the list.
Represents an item in the XPath 2.0 Data Model.
static const AtomicValue::Ptr EmptyString
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
The documentation for this class was generated from the following files: