20#ifndef _STATICTYPE_HPP
21#define _STATICTYPE_HPP
23#include <xqilla/framework/XQillaExport.hpp>
27#include <xercesc/framework/XMLBuffer.hpp>
33class XQILLA_API
StaticType :
public XERCES_CPP_NAMESPACE_QUALIFIER XMemory {
102 unsigned int min = 1,
unsigned int max = 1);
147 unsigned int getMin()
const {
return min_; }
148 unsigned int getMax()
const {
return max_; }
154 void typeToBuf(XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer &buf)
const;
165 unsigned int minArgs_;
166 unsigned int maxArgs_;
StaticType::StaticTypeFlags operator|(StaticType::StaticTypeFlags a, StaticType::StaticTypeFlags b)
StaticType::StaticTypeFlags operator&(StaticType::StaticTypeFlags a, StaticType::StaticTypeFlags b)
AtomicObjectType
Definition AnyAtomicType.hpp:34
The parse time static context interface.
Definition StaticContext.hpp:58
static StaticType create(const XMLCh *uri, const XMLCh *name, const StaticContext *context, bool &isExact)
unsigned int getMinArgs() const
Definition StaticType.hpp:150
void typeNodeIntersect(const StaticType &st)
StaticType(XPath2MemoryManager *mm, unsigned int numArgs, const StaticType &returnType, unsigned int min=1, unsigned int max=1)
Constructor for a function type.
StaticType & multiply(unsigned int min, unsigned int max)
StaticType & operator=(const StaticType &o)
StaticType()
Constructor for an empty type.
const StaticType * getReturnType() const
Definition StaticType.hpp:152
void typeToBuf(xercesc::XMLBuffer &buf) const
TypeMatch matches(const StaticType &actual) const
void typeExcept(const StaticType &st)
void setCardinality(unsigned int min, unsigned int max)
unsigned int getMax() const
Definition StaticType.hpp:148
StaticType & operator&=(const StaticType &st)
StaticType(const StaticType &o)
StaticType operator|(const StaticType &st) const
void typeUnion(const StaticType &st)
StaticType(StaticTypeFlags f, unsigned int min=1, unsigned int max=1)
void typeConcat(const StaticType &st)
bool containsType(const StaticType &type) const
bool isType(const StaticType &type) const
TypeMatchEnum
Definition StaticType.hpp:133
@ MAYBE
Definition StaticType.hpp:136
@ PROBABLY_NOT
Definition StaticType.hpp:135
@ NEVER
Definition StaticType.hpp:134
@ ALWAYS
Definition StaticType.hpp:137
StaticTypeFlags
Flags that determine what item types are returned from an expression.
Definition StaticType.hpp:38
@ PI_TYPE
Definition StaticType.hpp:43
@ TYPED_ATOMIC_TYPE
Definition StaticType.hpp:81
@ DECIMAL_TYPE
Definition StaticType.hpp:54
@ ATTRIBUTE_TYPE
Definition StaticType.hpp:41
@ DURATION_TYPE
Definition StaticType.hpp:56
@ G_DAY_TYPE
Definition StaticType.hpp:58
@ HEX_BINARY_TYPE
Definition StaticType.hpp:63
@ FLOAT_TYPE
Definition StaticType.hpp:57
@ TIME_TYPE
Definition StaticType.hpp:67
@ NOTATION_TYPE
Definition StaticType.hpp:64
@ STRING_TYPE
Definition StaticType.hpp:66
@ NODE_TYPE
Definition StaticType.hpp:73
@ ELEMENT_TYPE
Definition StaticType.hpp:40
@ NUMERIC_TYPE
Definition StaticType.hpp:76
@ DATE_TIME_TYPE
Definition StaticType.hpp:52
@ YEAR_MONTH_DURATION_TYPE
Definition StaticType.hpp:69
@ EMPTY_TYPE
Definition StaticType.hpp:89
@ DATE_TYPE
Definition StaticType.hpp:51
@ DOUBLE_TYPE
Definition StaticType.hpp:55
@ DAY_TIME_DURATION_TYPE
Definition StaticType.hpp:53
@ QNAME_TYPE
Definition StaticType.hpp:65
@ G_MONTH_TYPE
Definition StaticType.hpp:59
@ BASE_64_BINARY_TYPE
Definition StaticType.hpp:49
@ ANY_URI_TYPE
Definition StaticType.hpp:48
@ ANY_SIMPLE_TYPE
Definition StaticType.hpp:47
@ TEXT_TYPE
Definition StaticType.hpp:42
@ COMMENT_TYPE
Definition StaticType.hpp:44
@ G_MONTH_DAY_TYPE
Definition StaticType.hpp:60
@ G_YEAR_TYPE
Definition StaticType.hpp:61
@ DOCUMENT_TYPE
Definition StaticType.hpp:39
@ ITEM_TYPE
Definition StaticType.hpp:87
@ ANY_ATOMIC_TYPE
Definition StaticType.hpp:85
@ TIMEZONE_TYPE
Definition StaticType.hpp:78
@ NAMESPACE_TYPE
Definition StaticType.hpp:45
@ UNTYPED_ATOMIC_TYPE
Definition StaticType.hpp:68
@ G_YEAR_MONTH_TYPE
Definition StaticType.hpp:62
@ FUNCTION_TYPE
Definition StaticType.hpp:71
@ BOOLEAN_TYPE
Definition StaticType.hpp:50
StaticType & operator|=(const StaticType &st)
static StaticType create(AnyAtomicType::AtomicObjectType primitiveType)
bool containsType(StaticType::StaticTypeFlags flags) const
StaticType operator&(const StaticType &st) const
unsigned int getMin() const
Definition StaticType.hpp:147
unsigned int getMaxArgs() const
Definition StaticType.hpp:151
StaticType(XPath2MemoryManager *mm, unsigned int minArgs, unsigned int maxArgs, const StaticType &returnType, unsigned int min=1, unsigned int max=1)
Constructor for a function type.
StaticType & substitute(const StaticType &from, const StaticType &to)
static const unsigned int UNLIMITED
Definition StaticType.hpp:92
void typeIntersect(const StaticType &st)
Definition XPath2MemoryManager.hpp:46
Definition StaticType.hpp:141
TypeMatchEnum cardinality
Definition StaticType.hpp:142
TypeMatchEnum type
Definition StaticType.hpp:142