Qt 4.8
Public Functions | List of all members
QPatternist::SelfToSelfCaster Class Reference

Casts a value to itself. Essentially, this AtomicCaster does nothing. More...

#include <qatomiccasters_p.h>

Inheritance diagram for QPatternist::SelfToSelfCaster:
QPatternist::AtomicCaster QPatternist::AtomicTypeVisitorResult QSharedData

Public Functions

virtual Item castFrom (const Item &from, const QExplicitlySharedDataPointer< DynamicContext > &context) const
 
- Public Functions inherited from QPatternist::AtomicCaster
 AtomicCaster ()
 
virtual ~AtomicCaster ()
 
- Public Functions inherited from QPatternist::AtomicTypeVisitorResult
 AtomicTypeVisitorResult ()
 
virtual ~AtomicTypeVisitorResult ()
 
- 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...
 

Additional Inherited Members

- Public Types inherited from QPatternist::AtomicCaster
typedef QExplicitlySharedDataPointer< AtomicCasterPtr
 
- Public Types inherited from QPatternist::AtomicTypeVisitorResult
typedef QExplicitlySharedDataPointer< AtomicTypeVisitorResultPtr
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Casts a value to itself. Essentially, this AtomicCaster does nothing.

Casting a value to the type of itself is defined to be a noop, no operation. When it can be statically detected that will be done, CastAs rewrites itself appropriately during compilation, but in some cases insufficent data is available at compile time and then is this class need on a case-per-case base at evaluation time.

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

Definition at line 315 of file qatomiccasters_p.h.

Functions

◆ castFrom()

Item SelfToSelfCaster::castFrom ( const Item from,
const QExplicitlySharedDataPointer< DynamicContext > &  context 
) const
virtual

This function simply returns from.

Implements QPatternist::AtomicCaster.

Definition at line 154 of file qatomiccasters.cpp.

156 {
157  return from;
158 }

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