Qt 4.8
Public Types | Public Functions | Static Public Functions | Private Functions | Properties | Friends | List of all members
QPatternist::QNameValue Class Reference

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

#include <qqnamevalue_p.h>

Inheritance diagram for QPatternist::QNameValue:
QPatternist::AtomicValue QSharedData QPatternist::CppCastingHelper< AtomicValue >

Public Types

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

Public Functions

QXmlName qName () const
 
virtual QString stringValue () const
 
virtual ItemType::Ptr type () const
 
- Public Functions inherited from QPatternist::AtomicValue
virtual bool evaluateEBV (const QExplicitlySharedDataPointer< DynamicContext > &context) const
 
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 QNameValue::Ptr fromValue (const NamePool::Ptr &np, const QXmlName name)
 
- 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)
 

Private Functions

 QNameValue (const NamePool::Ptr &np, const QXmlName name)
 

Properties

const NamePool::Ptr m_namePool
 
const QXmlName m_qName
 

Friends

class CommonValues
 
class QNameComparator
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Protected Functions inherited from QPatternist::AtomicValue
 AtomicValue ()
 
- Protected Functions inherited from QPatternist::CppCastingHelper< AtomicValue >
 CppCastingHelper ()
 

Detailed Description

Implements the value instance of the xs:QName type.

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com
See also
QNameConstructor::expandQName()
XPathHelper::isQName()
QXmlUtils

Definition at line 73 of file qqnamevalue_p.h.

Typedefs

◆ Ptr

Definition at line 79 of file qqnamevalue_p.h.

Constructors and Destructors

◆ QNameValue()

QNameValue::QNameValue ( const NamePool::Ptr np,
const QXmlName  name 
)
private

Definition at line 52 of file qqnamevalue.cpp.

Referenced by fromValue(), and qName().

52  : m_qName(name)
53  , m_namePool(np)
54 {
55  Q_ASSERT(!name.isNull());
57 }
const NamePool::Ptr m_namePool
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
const QXmlName m_qName
bool isNull() const
Returns true if this QXmlName is not initialized with a valid combination of {namespace URI}...
Definition: qxmlname.cpp:224

Functions

◆ fromValue()

QNameValue::Ptr QNameValue::fromValue ( const NamePool::Ptr np,
const QXmlName  name 
)
static

Constructs a QNameValue that represents name.

Parameters
namethe QName. May not be null.
npthe NamePool.
See also
QNameConstructor::expandQName()
XPathHelper::isQName()
QXmlUtils

Definition at line 59 of file qqnamevalue.cpp.

Referenced by QPatternist::CastAs::castToQName(), QPatternist::AttributeNameValidator::evaluateSingleton(), QPatternist::NodeNameFN::evaluateSingleton(), QPatternist::QNameFN::evaluateSingleton(), QPatternist::QNameConstructor::evaluateSingleton(), QPatternist::ResolveQNameFN::evaluateSingleton(), QPatternist::XsdTypeChecker::fromLexical(), QPatternist::XsdSchemaResolver::resolveEnumerationFacetValues(), and QPatternist::yyparse().

60 {
61  Q_ASSERT(!name.isNull());
62  return QNameValue::Ptr(new QNameValue(np, name));
63 }
QExplicitlySharedDataPointer< QNameValue > Ptr
Definition: qqnamevalue_p.h:79
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QNameValue(const NamePool::Ptr &np, const QXmlName name)
Definition: qqnamevalue.cpp:52
bool isNull() const
Returns true if this QXmlName is not initialized with a valid combination of {namespace URI}...
Definition: qxmlname.cpp:224

◆ qName()

QXmlName QPatternist::QNameValue::qName ( ) const
inline

◆ stringValue()

QString QNameValue::stringValue ( ) const
virtual

Implements QPatternist::AtomicValue.

Definition at line 65 of file qqnamevalue.cpp.

66 {
67  return m_namePool->toLexical(m_qName);
68 }
const NamePool::Ptr m_namePool
const QXmlName m_qName
QString toLexical(const QXmlName qName) const
Definition: qnamepool_p.h:188

◆ type()

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

Implements QPatternist::AtomicValue.

Definition at line 70 of file qqnamevalue.cpp.

71 {
72  return BuiltinTypes::xsQName;
73 }
static const AtomicType::Ptr xsQName

Friends and Related Functions

◆ CommonValues

friend class CommonValues
friend

Definition at line 76 of file qqnamevalue_p.h.

◆ QNameComparator

friend class QNameComparator
friend

Definition at line 77 of file qqnamevalue_p.h.

Properties

◆ m_namePool

const NamePool::Ptr QPatternist::QNameValue::m_namePool
private

Definition at line 105 of file qqnamevalue_p.h.

Referenced by QNameValue(), and stringValue().

◆ m_qName

const QXmlName QPatternist::QNameValue::m_qName
private

Definition at line 104 of file qqnamevalue_p.h.

Referenced by QPatternist::QNameComparator::equals(), qName(), and stringValue().


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