Qt 4.8
Public Functions | Protected Functions | Properties | List of all members
QPatternist::CallSite Class Referenceabstract

Abstract base-class for Expression instances that are callsites to other components, such as templates or user functions. More...

#include <qcallsite_p.h>

Inheritance diagram for QPatternist::CallSite:
QPatternist::UnlimitedContainer QPatternist::Expression QSharedData QPatternist::CppCastingHelper< Expression > QPatternist::SourceLocationReflection QPatternist::TemplateInvoker QPatternist::UserFunctionCallsite QPatternist::ApplyTemplate QPatternist::CallTemplate

Public Functions

virtual Expression::Ptr body () const =0
 Returns the body of the function/template/component that is being called. More...
 
virtual CallTargetDescription::Ptr callTargetDescription () const =0
 
virtual bool configureRecursion (const CallTargetDescription::Ptr &sign)=0
 
bool isRecursive () const
 
QXmlName name () const
 
void setIsRecursive (const bool value)
 
- Public Functions inherited from QPatternist::UnlimitedContainer
virtual bool compressOperands (const StaticContext::Ptr &)
 
virtual Expression::List operands () const
 
virtual void setOperands (const Expression::List &list)
 
 UnlimitedContainer (const Expression::List &operands=Expression::List())
 
- Public Functions inherited from QPatternist::Expression
virtual ExpressionVisitorResult::Ptr accept (const ExpressionVisitor::Ptr &visitor) const =0
 
virtual const SourceLocationReflectionactualReflection () const
 Returns this. More...
 
virtual void announceFocusType (const ItemType::Ptr &itemType)
 
virtual Expression::Ptr compress (const StaticContext::Ptr &context)
 
Properties deepProperties () const
 Computes the union of properties for this Expression and all its descending children. More...
 
virtual Properties dependencies () const
 
virtual QString description () const
 
virtual bool evaluateEBV (const DynamicContext::Ptr &context) const
 
virtual Item::Iterator::Ptr evaluateSequence (const DynamicContext::Ptr &context) const
 
virtual Item evaluateSingleton (const DynamicContext::Ptr &context) const
 
virtual void evaluateToSequenceReceiver (const DynamicContext::Ptr &context) const
 
virtual ItemType::Ptr expectedContextItemType () const
 
virtual SequenceType::List expectedOperandTypes () const =0
 
 Expression ()
 
bool has (const Property prop) const
 
bool hasDependency (const Property prop) const
 
virtual ID id () const
 
bool is (const ID id) const
 
bool isEvaluated () const
 
virtual ItemType::Ptr newFocusType () const
 
virtual QList< QExplicitlySharedDataPointer< OptimizationPass > > optimizationPasses () const
 
virtual PatternPriority patternPriority () const
 
virtual Properties properties () const
 
const Expression::Ptrrewrite (const Expression::Ptr &to, const StaticContext::Ptr &context) const
 Rewrites this Expression to to, and return to. More...
 
virtual SequenceType::Ptr staticType () const =0
 
virtual Expression::Ptr typeCheck (const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)
 
virtual ~Expression ()
 
- 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< Expression >
const TCastTarget * as () const
 
TCastTarget * as ()
 
- Public Functions inherited from QPatternist::SourceLocationReflection
virtual QSourceLocation sourceLocation () const
 
 SourceLocationReflection ()
 
virtual ~SourceLocationReflection ()
 

Protected Functions

 CallSite (const QXmlName &name=QXmlName())
 
- Protected Functions inherited from QPatternist::UnlimitedContainer
template<CardinalityComputation suppliedCard>
SequenceType::Ptr operandsUnionType () const
 
- Protected Functions inherited from QPatternist::Expression
void typeCheckOperands (const StaticContext::Ptr &context)
 
- Protected Functions inherited from QPatternist::CppCastingHelper< Expression >
 CppCastingHelper ()
 

Properties

bool m_isRecursive
 
const QXmlName m_name
 

Additional Inherited Members

- Public Types inherited from QPatternist::UnlimitedContainer
enum  CardinalityComputation { ProductOfCardinality, UnionOfCardinality }
 
- Public Types inherited from QPatternist::Expression
typedef QExplicitlySharedDataPointer< const ExpressionConstPtr
 A smart pointer wrapping const Expression instances. More...
 
enum  ID {
  IDBooleanValue = 1, IDCountFN, IDEmptyFN, IDExistsFN,
  IDExpressionSequence, IDGeneralComparison, IDIfThenClause, IDIgnorableExpression,
  IDIntegerValue, IDPositionFN, IDStringValue, IDValueComparison,
  IDRangeVariableReference, IDContextItem, IDUserFunctionCallsite, IDExpressionVariableReference,
  IDAttributeConstructor, IDUpperCaseFN, IDLowerCaseFN, IDFirstItemPredicate,
  IDEmptySequence, IDReturnOrderBy, IDLetClause, IDForClause,
  IDPath, IDNamespaceConstructor, IDArgumentReference, IDGenericPredicate,
  IDAxisStep, IDFloat, IDCombineNodes, IDUnresolvedVariableReference,
  IDCardinalityVerifier
}
 
typedef QList< Expression::PtrList
 
typedef QFlags< PropertyProperties
 
enum  Property {
  UseContextItem = 1, DisableElimination = 1 << 1, IsEvaluated = 1 << 2, DisableTypingDeduction = 1 << 3,
  EmptynessFollowsChild = 1 << 4, RewriteToEmptyOnEmpty = 1 << 5, RequiresFocus = 1 << 6, AffectsOrderOnly = 1 << 7,
  RequiresContextItem = (1 << 8) | RequiresFocus, CreatesFocusForLast = 1 << 9, LastOperandIsCollation = 1 << 10, DependsOnLocalVariable = (1 << 11) | DisableElimination,
  EvaluationCacheRedundant = (1 << 12), IsNodeConstructor = 1 << 13, RequiresCurrentItem = 1 << 14
}
 
typedef QExplicitlySharedDataPointer< ExpressionPtr
 A smart pointer wrapping mutable Expression instances. More...
 
typedef ::QAbstractXmlForwardIterator< Expression::PtrQAbstractXmlForwardIterator
 
typedef QVector< Expression::PtrVector
 
- Static Public Functions inherited from QPatternist::Expression
static void rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context)
 
- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Protected Variables inherited from QPatternist::UnlimitedContainer
Expression::List m_operands
 

Detailed Description

Abstract base-class for Expression instances that are callsites to other components, such as templates or user functions.

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

Definition at line 72 of file qcallsite_p.h.

Constructors and Destructors

◆ CallSite()

CallSite::CallSite ( const QXmlName name = QXmlName())
protected

Definition at line 48 of file qcallsite.cpp.

48  : m_isRecursive(false)
49  , m_name(name)
50 {
51 }
const QXmlName m_name
Definition: qcallsite_p.h:104

Functions

◆ body()

virtual Expression::Ptr QPatternist::CallSite::body ( ) const
pure virtual

Returns the body of the function/template/component that is being called.

Implemented in QPatternist::UserFunctionCallsite, QPatternist::ApplyTemplate, and QPatternist::CallTemplate.

◆ callTargetDescription()

virtual CallTargetDescription::Ptr QPatternist::CallSite::callTargetDescription ( ) const
pure virtual

◆ configureRecursion()

virtual bool QPatternist::CallSite::configureRecursion ( const CallTargetDescription::Ptr sign)
pure virtual

Called in the earliest stages of the compilation process. sign can be any function signature for a user declared function. If sign matches this UserFunctionCallsite, it means the UserFunction represented by sign is recursive and that this UserFunctionCallsite should take appropriate measures.

Returns
true if is recursive, otherwise false

Implemented in QPatternist::UserFunctionCallsite, QPatternist::ApplyTemplate, and QPatternist::CallTemplate.

◆ isRecursive()

bool CallSite::isRecursive ( ) const

◆ name()

QXmlName CallSite::name ( ) const

◆ setIsRecursive()

void CallSite::setIsRecursive ( const bool  value)

Definition at line 63 of file qcallsite.cpp.

Referenced by QPatternist::UserFunctionCallsite::configureRecursion().

64 {
65  m_isRecursive = value;
66 }

Properties

◆ m_isRecursive

bool QPatternist::CallSite::m_isRecursive
private

Definition at line 103 of file qcallsite_p.h.

Referenced by isRecursive(), and setIsRecursive().

◆ m_name

const QXmlName QPatternist::CallSite::m_name
private

Definition at line 104 of file qcallsite_p.h.

Referenced by name().


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