Qt 4.8
Public Types | Public Functions | List of all members
QPatternist::ExpressionCreator Class Referenceabstract

A factory for creating Expression instances. More...

#include <qoptimizerframework_p.h>

Inheritance diagram for QPatternist::ExpressionCreator:
QSharedData QPatternist::ByIDCreator

Public Types

typedef QExplicitlySharedDataPointer< ExpressionCreatorPtr
 

Public Functions

virtual Expression::Ptr create (const Expression::List &operands, const StaticContext::Ptr &context, const SourceLocationReflection *const) const =0
 
 ExpressionCreator ()
 
virtual ~ExpressionCreator ()
 
- 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 Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

A factory for creating Expression instances.

ExpressionIdentifier is one of the building block of Patternist's optimizer framework. An ExpressionIdentifier sub-class has the responsibility of creating the Expression that should be the result of the optimization.

This class and sub-classes are never used on their own, but in cooperation with OptimizationPass.

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

Definition at line 79 of file qoptimizerframework_p.h.

Typedefs

◆ Ptr

Definition at line 82 of file qoptimizerframework_p.h.

Constructors and Destructors

◆ ExpressionCreator()

QPatternist::ExpressionCreator::ExpressionCreator ( )
inline

For some reason this constructor cannot be synthesized.

Definition at line 87 of file qoptimizerframework_p.h.

88  {
89  }

◆ ~ExpressionCreator()

ExpressionCreator::~ExpressionCreator ( )
virtual

Definition at line 52 of file qoptimizerframework.cpp.

Referenced by ExpressionCreator().

53 {
54 }

Functions

◆ create()

virtual Expression::Ptr QPatternist::ExpressionCreator::create ( const Expression::List operands,
const StaticContext::Ptr context,
const SourceLocationReflection const 
) const
pure virtual

Creates an expression that has operands as operands.

The Expression that is returned is guaranteed, by the caller, to get a treatment identical to if the expression was created in an ordinary compilation(via the parser, and so forth). That is, Expression::typeCheck() and Expression::compress() stages will be carried out on the returned expression.

Returns
an Expression::Ptr that never is non null, valid pointer

Implemented in QPatternist::ByIDCreator.

Referenced by ExpressionCreator().


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