Patternist::FunctionCall Class Reference
[Function Implementations]

Base class for implementations of builtin functions. More...

#include <FunctionCall.h>

Inheritance diagram for Patternist::FunctionCall:

Inheritance graph
[legend]
Collaboration diagram for Patternist::FunctionCall:

Collaboration graph
[legend]
List of all members.

Public Types

typedef PlainSharedPtr< FunctionCallPtr

Public Member Functions

virtual ExpressionVisitorResult::Ptr accept (const ExpressionVisitor::Ptr &visitor) const
virtual SequenceType::List expectedOperandTypes () const
virtual ID id () const
virtual Expression::Properties properties () const
virtual void setSignature (const FunctionSignature::Ptr &sign)
virtual FunctionSignature::Ptr signature () const
virtual SequenceType::Ptr staticType () const
virtual Expression::Ptr typeCheck (const StaticContext::Ptr &context, const SequenceType::Ptr &reqType)

Detailed Description

Base class for implementations of builtin functions.

However, it doesn't handle user declared functions.

Author:
Frans Englich <frans.englich@telia.com>

Definition at line 32 of file FunctionCall.h.


Member Typedef Documentation

typedef PlainSharedPtr<FunctionCall> Patternist::FunctionCall::Ptr

A smart pointer wrapping Expression instances.

Reimplemented from Patternist::Expression.

Definition at line 35 of file FunctionCall.h.


Member Function Documentation

SequenceType::List FunctionCall::expectedOperandTypes (  )  const [virtual]

Returns a list of Sequence Types, describing the type of each of the expression's operands. Hence, this function has a relationship to the operands() function:

This function should not be confused with staticType(), which returns the static type of the expression itself, not its operands. The function call is an expression where this is clear: the type of the return value is not the same as the arguments' types. The static type of the operands supplied to the expression can be determined via the staticType() function of the instances returned by operands().

If the expression has no operands, an empty list should be returned.

Implements Patternist::Expression.

Definition at line 33 of file FunctionCall.cpp.

References signature().

Here is the call graph for this function:

Expression::ID FunctionCall::id (  )  const [virtual]

This property, which has no setter, returns an enum value that uniquely identifies this Expression. Patternist makes no use of C++'s dynamic_cast feature, but uses this polymorphic function instead.

Returns:
always IgnorableExpression.

Reimplemented from Patternist::Expression.

Definition at line 127 of file FunctionCall.cpp.

Expression::Properties FunctionCall::properties (  )  const [virtual]

Returns:
a bitwise OR'd value of properties, describing the characteristics of the expression. These properties affects how this Expression is treated in for example type checking stages.
The default implementation returns 0. Override and let the function return a different value, if that's of interest.

Returns:
Expression::None, meaning no special properties

Reimplemented from Patternist::Expression.

Definition at line 116 of file FunctionCall.cpp.

References signature().

Referenced by typeCheck().

Here is the call graph for this function:

Here is the caller graph for this function:

SequenceType::Ptr FunctionCall::staticType (  )  const [virtual]

Returns:
the static type of this Expression. For example, an 'and' expression have as static type xs:boolean

Implements Patternist::Expression.

Reimplemented in Patternist::AvgFN, Patternist::SumFN, Patternist::Aggregator, Patternist::RootFN, Patternist::DistinctValuesFN, Patternist::InsertBeforeFN, Patternist::RemoveFN, Patternist::ReverseFN, Patternist::SubsequenceFN, Patternist::DocFN, and Patternist::TraceFN.

Definition at line 93 of file FunctionCall.cpp.

References Patternist::Expression::EmptynessFollowsChild, Patternist::Expression::has(), Patternist::UnlimitedContainer::m_operands, Patternist::Cardinality::oneOrMore(), and signature().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Feb 8 14:54:33 2007 for Patternist by  doxygen 1.5.1