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

Base class for expressions that has no operands. More...

#include <qemptycontainer_p.h>

Inheritance diagram for QPatternist::EmptyContainer:
QPatternist::Expression QSharedData QPatternist::CppCastingHelper< Expression > QPatternist::SourceLocationReflection QPatternist::AxisStep QPatternist::ContextItem QPatternist::EmptySequence QPatternist::ExternalVariableReference QPatternist::Literal QPatternist::LiteralSequence QPatternist::NamespaceConstructor QPatternist::ParentNodeAxis QPatternist::TemplateParameterReference QPatternist::UnresolvedVariableReference QPatternist::VariableReference

Public Functions

virtual Expression::List operands () const
 
virtual void setOperands (const 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
 
 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

virtual bool compressOperands (const StaticContext::Ptr &context)
 
virtual SequenceType::List expectedOperandTypes () const
 
- Protected Functions inherited from QPatternist::Expression
void typeCheckOperands (const StaticContext::Ptr &context)
 
- Protected Functions inherited from QPatternist::CppCastingHelper< Expression >
 CppCastingHelper ()
 

Additional Inherited Members

- 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
 

Detailed Description

Base class for expressions that has no operands.

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

Definition at line 69 of file qemptycontainer_p.h.

Functions

◆ compressOperands()

bool EmptyContainer::compressOperands ( const StaticContext::Ptr context)
protectedvirtual
Returns
always true

Implements QPatternist::Expression.

Definition at line 64 of file qemptycontainer.cpp.

65 {
66  return true;
67 }

◆ expectedOperandTypes()

SequenceType::List EmptyContainer::expectedOperandTypes ( ) const
protectedvirtual
Returns
always an empty list since it has no operands.

Implements QPatternist::Expression.

Reimplemented in QPatternist::AxisStep, QPatternist::NamespaceConstructor, and QPatternist::UnresolvedVariableReference.

Definition at line 55 of file qemptycontainer.cpp.

56 {
57  return SequenceType::List();
58 }
QList< SequenceType::Ptr > List

◆ operands()

Expression::List EmptyContainer::operands ( ) const
virtual
Returns
always an empty list.

Implements QPatternist::Expression.

Definition at line 50 of file qemptycontainer.cpp.

51 {
52  return Expression::List();
53 }
QList< Expression::Ptr > List

◆ setOperands()

void EmptyContainer::setOperands ( const Expression::List )
virtual

Does nothing, since sub-classes has no operands. Calling it makes hence no sense, and it also results in an assert crash.

Implements QPatternist::Expression.

Definition at line 60 of file qemptycontainer.cpp.

61 {
62 }

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