Qt 4.8
Public Types | Public Functions | Static Public Functions | Protected Functions | Protected Variables | Friends | List of all members
QPatternist::AtomicString Class Reference

Implements the value instance of the xs:string type. More...

#include <qatomicstring_p.h>

Inheritance diagram for QPatternist::AtomicString:
QPatternist::AtomicValue QSharedData QPatternist::CppCastingHelper< AtomicValue > QPatternist::AnyURI QPatternist::UntypedAtomic

Public Types

typedef AtomicValue::Ptr Ptr
 
- Public Types inherited from QPatternist::AtomicValue
typedef QList< AtomicValue::PtrList
 
typedef QExplicitlySharedDataPointer< AtomicValuePtr
 

Public Functions

virtual bool evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &) const
 
virtual QString stringValue () const
 
virtual ItemType::Ptr type () const
 
- Public Functions inherited from QPatternist::AtomicValue
virtual bool hasError () const
 
virtual ~AtomicValue ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 
- Public Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
const TCastTarget * as () const
 
TCastTarget * as ()
 

Static Public Functions

static AtomicString::Ptr fromValue (const QString &value)
 
static AtomicString::Ptr fromValue (const QUrl &value)
 
- Static Public Functions inherited from QPatternist::AtomicValue
static ItemType::Ptr qtToXDMType (const QXmlItem &item)
 
static QVariant toQt (const AtomicValue *const value)
 
static QVariant toQt (const AtomicValue::Ptr &value)
 
static Item toXDM (const QVariant &value)
 

Protected Functions

 AtomicString (const QString &value)
 
- Protected Functions inherited from QPatternist::AtomicValue
 AtomicValue ()
 
- Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
 CppCastingHelper ()
 

Protected Variables

const QString m_value
 

Friends

class CommonValues
 
class CompareFN
 
class StringComparator
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Implements the value instance of the xs:string type.

This class was originally called String, and correspondingly the header file was called String.h. However, this broke building on OS X, which looks up file names case insensitively, and therefore found string.h.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 77 of file qatomicstring_p.h.

Typedefs

◆ Ptr

Definition at line 82 of file qatomicstring_p.h.

Constructors and Destructors

◆ AtomicString()

AtomicString::AtomicString ( const QString value)
protected

Definition at line 50 of file qatomicstring.cpp.

Referenced by fromValue().

50  : m_value(s)
51 {
52 }

Functions

◆ evaluateEBV()

bool AtomicString::evaluateEBV ( const QExplicitlySharedDataPointer< DynamicContext > &  ) const
virtual

Get the Effective Boolean Value of this string. A zero-length string has an effective boolean value of false, in all other cases true.

Returns
false if the contained string has a zero-length, otherwise true.

Reimplemented from QPatternist::AtomicValue.

Definition at line 59 of file qatomicstring.cpp.

60 {
61  return m_value.length() > 0;
62 }
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696

◆ fromValue() [1/2]

AtomicString::Ptr AtomicString::fromValue ( const QString value)
static

Creates an instance representing value.

Note
This function does not remove the string literal escaping allowed in XPath 2.0

Definition at line 54 of file qatomicstring.cpp.

Referenced by QPatternist::InScopePrefixesFN::evaluateSequence(), QPatternist::UnparsedEntityPublicIDFN::evaluateSingleton(), QPatternist::SystemPropertyFN::evaluateSingleton(), QPatternist::XSLTSimpleContentConstructor::evaluateSingleton(), QPatternist::GenerateIDFN::evaluateSingleton(), QPatternist::SimpleContentConstructor::evaluateSingleton(), QPatternist::NCNameConstructor::evaluateSingleton(), QPatternist::NameFN::evaluateSingleton(), QPatternist::CodepointsToStringFN::evaluateSingleton(), QPatternist::ConcatFN::evaluateSingleton(), QPatternist::LocalNameFN::evaluateSingleton(), QPatternist::ReplaceFN::evaluateSingleton(), QPatternist::StringJoinFN::evaluateSingleton(), QPatternist::StringFN::evaluateSingleton(), QPatternist::PrefixFromQNameFN::evaluateSingleton(), QPatternist::SubstringFN::evaluateSingleton(), QPatternist::SubstringBeforeFN::evaluateSingleton(), QPatternist::LocalNameFromQNameFN::evaluateSingleton(), QPatternist::SubstringAfterFN::evaluateSingleton(), QPatternist::NormalizeSpaceFN::evaluateSingleton(), QPatternist::NormalizeUnicodeFN::evaluateSingleton(), QPatternist::UpperCaseFN::evaluateSingleton(), QPatternist::LowerCaseFN::evaluateSingleton(), QPatternist::TranslateFN::evaluateSingleton(), QPatternist::EncodeString::evaluateSingleton(), QPatternist::ValueFactory::fromLexical(), QPatternist::StringListIterator::inputToOutputItem(), QPatternist::TokenizeFN::mapToItem(), QPatternist::AccelTreeResourceLoader::openUnparsedText(), QPatternist::AccelTree::sequencedTypedValue(), QPatternist::AtomicValue::toXDM(), QPatternist::DefaultCollationFN::typeCheck(), and QPatternist::yyparse().

55 {
56  return AtomicString::Ptr(new AtomicString(value));
57 }
AtomicString(const QString &value)

◆ fromValue() [2/2]

static AtomicString::Ptr QPatternist::AtomicString::fromValue ( const QUrl value)
inlinestatic

Definition at line 91 of file qatomicstring_p.h.

92  {
93  return fromValue(value.toString());
94  }
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
Definition: qurl.cpp:5896
static AtomicString::Ptr fromValue(const QString &value)

◆ stringValue()

QString AtomicString::stringValue ( ) const
virtual

The string value of a AtomicString instance is the value space.

Implements QPatternist::AtomicValue.

Definition at line 64 of file qatomicstring.cpp.

65 {
66  return m_value;
67 }

◆ type()

ItemType::Ptr AtomicString::type ( ) const
virtual

Implements QPatternist::AtomicValue.

Reimplemented in QPatternist::AnyURI, and QPatternist::UntypedAtomic.

Definition at line 69 of file qatomicstring.cpp.

70 {
72 }
static const AtomicType::Ptr xsString

Friends and Related Functions

◆ CommonValues

friend class CommonValues
friend

Definition at line 80 of file qatomicstring_p.h.

◆ CompareFN

friend class CompareFN
friend

Definition at line 113 of file qatomicstring_p.h.

◆ StringComparator

friend class StringComparator
friend

Definition at line 112 of file qatomicstring_p.h.

Properties

◆ m_value

const QString QPatternist::AtomicString::m_value
protected

Definition at line 115 of file qatomicstring_p.h.

Referenced by evaluateEBV(), stringValue(), and QPatternist::AnyURI::toQUrl().


The documentation for this class was generated from the following files: