Qt 4.8
Public Functions | Properties | List of all members
PerformValueConstruction Class Reference

Helper class for ValueFactory::fromLexical() which exposes CastingPlatform appropriately. More...

Inheritance diagram for PerformValueConstruction:
QPatternist::CastingPlatform< PerformValueConstruction, false > QPatternist::SourceLocationReflection

Public Functions

const SourceLocationReflectionactualReflection () const
 
AtomicValue::Ptr operator() (const AtomicValue::Ptr &lexicalValue, const SchemaType::Ptr &, const ReportContext::Ptr &context)
 
 PerformValueConstruction (const SourceLocationReflection *const sourceLocationReflection, const SchemaType::Ptr &toType)
 
ItemType::Ptr targetType () const
 
- Public Functions inherited from QPatternist::SourceLocationReflection
virtual QString description () const
 
virtual QSourceLocation sourceLocation () const
 
 SourceLocationReflection ()
 
virtual ~SourceLocationReflection ()
 

Properties

const SourceLocationReflection *const m_sourceReflection
 
const ItemType::Ptr m_targetType
 

Additional Inherited Members

- Protected Functions inherited from QPatternist::CastingPlatform< PerformValueConstruction, false >
Item cast (const Item &sourceValue, const ReportContext::Ptr &context) const
 
 CastingPlatform (const ReportContext::ErrorCode code=ReportContext::FORG0001)
 
void checkTargetType (const ReportContext::Ptr &context) const
 
bool prepareCasting (const ReportContext::Ptr &context, const ItemType::Ptr &sourceType)
 

Detailed Description

Helper class for ValueFactory::fromLexical() which exposes CastingPlatform appropriately.

Definition at line 57 of file qvaluefactory.cpp.

Constructors and Destructors

◆ PerformValueConstruction()

PerformValueConstruction::PerformValueConstruction ( const SourceLocationReflection *const  sourceLocationReflection,
const SchemaType::Ptr toType 
)
inline

Definition at line 61 of file qvaluefactory.cpp.

62  : m_sourceReflection(sourceLocationReflection)
63  , m_targetType(AtomicType::Ptr(toType))
64  {
66  }
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
Definition: qshareddata.h:136
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
const SourceLocationReflection *const m_sourceReflection
const ItemType::Ptr m_targetType

Functions

◆ actualReflection()

const SourceLocationReflection* PerformValueConstruction::actualReflection ( ) const
inlinevirtual

Implements QPatternist::SourceLocationReflection.

Definition at line 76 of file qvaluefactory.cpp.

77  {
78  return m_sourceReflection;
79  }
const SourceLocationReflection *const m_sourceReflection

◆ operator()()

AtomicValue::Ptr PerformValueConstruction::operator() ( const AtomicValue::Ptr lexicalValue,
const SchemaType::Ptr ,
const ReportContext::Ptr context 
)
inline

Definition at line 68 of file qvaluefactory.cpp.

71  {
72  prepareCasting(context, BuiltinTypes::xsString);
73  return AtomicValue::Ptr(const_cast<AtomicValue *>(cast(lexicalValue, context).asAtomicValue()));
74  }
Item cast(const Item &sourceValue, const ReportContext::Ptr &context) const
bool prepareCasting(const ReportContext::Ptr &context, const ItemType::Ptr &sourceType)

◆ targetType()

ItemType::Ptr PerformValueConstruction::targetType ( ) const
inline

Definition at line 81 of file qvaluefactory.cpp.

82  {
83  return m_targetType;
84  }
const ItemType::Ptr m_targetType

Properties

◆ m_sourceReflection

const SourceLocationReflection* const PerformValueConstruction::m_sourceReflection
private

Definition at line 87 of file qvaluefactory.cpp.

◆ m_targetType

const ItemType::Ptr PerformValueConstruction::m_targetType
private

Definition at line 88 of file qvaluefactory.cpp.


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