Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::UserFunction Class Reference

A function created with XQuery's declare function declaration. More...

#include <quserfunction_p.h>

Inheritance diagram for QPatternist::UserFunction:
QSharedData

Public Types

typedef QList< UserFunction::PtrList
 
typedef QExplicitlySharedDataPointer< UserFunctionPtr
 

Public Functions

VariableDeclaration::List argumentDeclarations () const
 
const Expression::Ptrbody () const
 
VariableSlotID expressionSlotOffset () const
 
void setBody (const Expression::Ptr &newBody)
 
FunctionSignature::Ptr signature () const
 
 UserFunction (const FunctionSignature::Ptr &signature, const Expression::Ptr &body, const VariableSlotID slotOffset, const VariableDeclaration::List &varDecls)
 
- 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...
 

Properties

const VariableDeclaration::List m_argumentDeclarations
 
Expression::Ptr m_body
 
const FunctionSignature::Ptr m_signature
 
const VariableSlotID m_slotOffset
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

A function created with XQuery's declare function declaration.

See also
UserFunctionCall
ArgumentReference
Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 77 of file quserfunction_p.h.

Typedefs

◆ List

Definition at line 81 of file quserfunction_p.h.

◆ Ptr

Definition at line 80 of file quserfunction_p.h.

Constructors and Destructors

◆ UserFunction()

UserFunction::UserFunction ( const FunctionSignature::Ptr signature,
const Expression::Ptr body,
const VariableSlotID  slotOffset,
const VariableDeclaration::List varDecls 
)

If slotOffset is -1, it means this function has no arguments.

Definition at line 49 of file quserfunction.cpp.

52  : m_signature(sign),
53  m_body(b),
54  m_slotOffset(slotOffset),
55  m_argumentDeclarations(varDecls)
56 {
59  Q_ASSERT(m_slotOffset > -2);
60 }
const VariableDeclaration::List m_argumentDeclarations
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static int sign(int x)
const VariableSlotID m_slotOffset
const FunctionSignature::Ptr m_signature

Functions

◆ argumentDeclarations()

VariableDeclaration::List QPatternist::UserFunction::argumentDeclarations ( ) const
inline

Definition at line 119 of file quserfunction_p.h.

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

120  {
121  return m_argumentDeclarations;
122  }
const VariableDeclaration::List m_argumentDeclarations

◆ body()

const Expression::Ptr & QPatternist::UserFunction::body ( ) const
inline

Definition at line 104 of file quserfunction_p.h.

Referenced by QPatternist::UserFunctionCallsite::setSource(), and QPatternist::UserFunctionCallsite::typeCheck().

105  {
106  return m_body;
107  }

◆ expressionSlotOffset()

VariableSlotID QPatternist::UserFunction::expressionSlotOffset ( ) const
inline

Definition at line 114 of file quserfunction_p.h.

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

115  {
116  return m_slotOffset;
117  }
const VariableSlotID m_slotOffset

◆ setBody()

void QPatternist::UserFunction::setBody ( const Expression::Ptr newBody)
inline

Definition at line 124 of file quserfunction_p.h.

125  {
126  m_body = newBody;
127  }

◆ signature()

FunctionSignature::Ptr QPatternist::UserFunction::signature ( ) const
inline

Definition at line 109 of file quserfunction_p.h.

Referenced by QPatternist::UserFunctionCallsite::callTargetDescription(), and QPatternist::UserFunctionCallsite::expectedOperandTypes().

110  {
111  return m_signature;
112  }
const FunctionSignature::Ptr m_signature

Properties

◆ m_argumentDeclarations

const VariableDeclaration::List QPatternist::UserFunction::m_argumentDeclarations
private

Definition at line 101 of file quserfunction_p.h.

Referenced by argumentDeclarations().

◆ m_body

Expression::Ptr QPatternist::UserFunction::m_body
private

Definition at line 99 of file quserfunction_p.h.

Referenced by body(), setBody(), and UserFunction().

◆ m_signature

const FunctionSignature::Ptr QPatternist::UserFunction::m_signature
private

Definition at line 98 of file quserfunction_p.h.

Referenced by signature(), and UserFunction().

◆ m_slotOffset

const VariableSlotID QPatternist::UserFunction::m_slotOffset
private

Definition at line 100 of file quserfunction_p.h.

Referenced by expressionSlotOffset(), and UserFunction().


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