SourceForge.net Logo
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
StaticType Class Reference

Class that represents the static type of an expression. More...

#include <StaticType.hpp>

Inheritance diagram for StaticType:
Inheritance graph
[legend]

Classes

struct  TypeMatch
 

Public Types

enum  StaticTypeFlags {
  DOCUMENT_TYPE = 0x00000001, ELEMENT_TYPE = 0x00000002, ATTRIBUTE_TYPE = 0x00000004, TEXT_TYPE = 0x00000008,
  PI_TYPE = 0x00000010, COMMENT_TYPE = 0x00000020, NAMESPACE_TYPE = 0x00000040, ANY_SIMPLE_TYPE = 0x00000080,
  ANY_URI_TYPE = 0x00000100, BASE_64_BINARY_TYPE = 0x00000200, BOOLEAN_TYPE = 0x00000400, DATE_TYPE = 0x00000800,
  DATE_TIME_TYPE = 0x00001000, DAY_TIME_DURATION_TYPE = 0x00002000, DECIMAL_TYPE = 0x00004000, DOUBLE_TYPE = 0x00008000,
  DURATION_TYPE = 0x00010000, FLOAT_TYPE = 0x00020000, G_DAY_TYPE = 0x00040000, G_MONTH_TYPE = 0x00080000,
  G_MONTH_DAY_TYPE = 0x00100000, G_YEAR_TYPE = 0x00200000, G_YEAR_MONTH_TYPE = 0x00400000, HEX_BINARY_TYPE = 0x00800000,
  NOTATION_TYPE = 0x01000000, QNAME_TYPE = 0x02000000, STRING_TYPE = 0x04000000, TIME_TYPE = 0x08000000,
  UNTYPED_ATOMIC_TYPE = 0x10000000, YEAR_MONTH_DURATION_TYPE = 0x20000000, FUNCTION_TYPE = 0x40000000, NODE_TYPE,
  NUMERIC_TYPE = (DECIMAL_TYPE | FLOAT_TYPE | DOUBLE_TYPE), TIMEZONE_TYPE, TYPED_ATOMIC_TYPE, ANY_ATOMIC_TYPE = (TYPED_ATOMIC_TYPE | UNTYPED_ATOMIC_TYPE),
  ITEM_TYPE = (NODE_TYPE | ANY_ATOMIC_TYPE | FUNCTION_TYPE), EMPTY_TYPE = 0
}
 Flags that determine what item types are returned from an expression. More...
 
enum  TypeMatchEnum { NEVER = 0, PROBABLY_NOT = 1, MAYBE = 2, ALWAYS = 3 }
 

Public Member Functions

 StaticType ()
 Constructor for an empty type. More...
 
 StaticType (StaticTypeFlags f, unsigned int min=1, unsigned int max=1)
 
 StaticType (XPath2MemoryManager *mm, unsigned int numArgs, const StaticType &returnType, unsigned int min=1, unsigned int max=1)
 Constructor for a function type. More...
 
 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. More...
 
 StaticType (const StaticType &o)
 
StaticTypeoperator= (const StaticType &o)
 
 ~StaticType ()
 
void typeUnion (const StaticType &st)
 
void typeIntersect (const StaticType &st)
 
void typeExcept (const StaticType &st)
 
void typeConcat (const StaticType &st)
 
void typeNodeIntersect (const StaticType &st)
 
StaticType operator| (const StaticType &st) const
 
StaticTypeoperator|= (const StaticType &st)
 
StaticType operator & (const StaticType &st) const
 
StaticTypeoperator &= (const StaticType &st)
 
StaticTypesubstitute (const StaticType &from, const StaticType &to)
 
StaticTypemultiply (unsigned int min, unsigned int max)
 
void setCardinality (unsigned int min, unsigned int max)
 
bool containsType (const StaticType &type) const
 
bool containsType (StaticType::StaticTypeFlags flags) const
 
bool isType (const StaticType &type) const
 
TypeMatch matches (const StaticType &actual) const
 
unsigned int getMin () const
 
unsigned int getMax () const
 
unsigned int getMinArgs () const
 
unsigned int getMaxArgs () const
 
const StaticTypegetReturnType () const
 
void typeToBuf (xercesc::XMLBuffer &buf) const
 
- Public Member Functions inherited from xercesc::XMemory
void * operator new (size_t size)
 This method overrides operator new. More...
 
void * operator new (size_t size, MemoryManager *memMgr)
 This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
 
void * operator new (size_t size, void *ptr)
 This method overrides placement operator new. More...
 
void operator delete (void *p)
 This method overrides operator delete. More...
 
void operator delete (void *p, MemoryManager *memMgr)
 This method provides a matching delete for the custom operator new. More...
 
void operator delete (void *p, void *ptr)
 This method provides a matching delete for the placement new. More...
 

Static Public Member Functions

static StaticType create (const XMLCh *uri, const XMLCh *name, const StaticContext *context, bool &isExact)
 
static StaticType create (AnyAtomicType::AtomicObjectType primitiveType)
 

Static Public Attributes

static const unsigned int UNLIMITED
 

Additional Inherited Members

- Protected Member Functions inherited from xercesc::XMemory
 XMemory ()
 Protected default constructor. More...
 

Detailed Description

Class that represents the static type of an expression.

Member Enumeration Documentation

◆ StaticTypeFlags

Flags that determine what item types are returned from an expression.

Enumerator
DOCUMENT_TYPE 
ELEMENT_TYPE 
ATTRIBUTE_TYPE 
TEXT_TYPE 
PI_TYPE 
COMMENT_TYPE 
NAMESPACE_TYPE 
ANY_SIMPLE_TYPE 
ANY_URI_TYPE 
BASE_64_BINARY_TYPE 
BOOLEAN_TYPE 
DATE_TYPE 
DATE_TIME_TYPE 
DAY_TIME_DURATION_TYPE 
DECIMAL_TYPE 
DOUBLE_TYPE 
DURATION_TYPE 
FLOAT_TYPE 
G_DAY_TYPE 
G_MONTH_TYPE 
G_MONTH_DAY_TYPE 
G_YEAR_TYPE 
G_YEAR_MONTH_TYPE 
HEX_BINARY_TYPE 
NOTATION_TYPE 
QNAME_TYPE 
STRING_TYPE 
TIME_TYPE 
UNTYPED_ATOMIC_TYPE 
YEAR_MONTH_DURATION_TYPE 
FUNCTION_TYPE 
NODE_TYPE 
NUMERIC_TYPE 
TIMEZONE_TYPE 
TYPED_ATOMIC_TYPE 
ANY_ATOMIC_TYPE 
ITEM_TYPE 
EMPTY_TYPE 

◆ TypeMatchEnum

Enumerator
NEVER 
PROBABLY_NOT 
MAYBE 
ALWAYS 

Constructor & Destructor Documentation

◆ StaticType() [1/5]

StaticType::StaticType ( )

Constructor for an empty type.

◆ StaticType() [2/5]

StaticType::StaticType ( StaticTypeFlags  f,
unsigned int  min = 1,
unsigned int  max = 1 
)

◆ StaticType() [3/5]

StaticType::StaticType ( XPath2MemoryManager mm,
unsigned int  numArgs,
const StaticType returnType,
unsigned int  min = 1,
unsigned int  max = 1 
)

Constructor for a function type.

◆ StaticType() [4/5]

StaticType::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() [5/5]

StaticType::StaticType ( const StaticType o)

◆ ~StaticType()

StaticType::~StaticType ( )

Member Function Documentation

◆ containsType() [1/2]

bool StaticType::containsType ( const StaticType type) const

◆ containsType() [2/2]

bool StaticType::containsType ( StaticType::StaticTypeFlags  flags) const

◆ create() [1/2]

static StaticType StaticType::create ( const XMLCh *  uri,
const XMLCh *  name,
const StaticContext context,
bool &  isExact 
)
static

◆ create() [2/2]

static StaticType StaticType::create ( AnyAtomicType::AtomicObjectType  primitiveType)
static

◆ getMax()

unsigned int StaticType::getMax ( ) const
inline

◆ getMaxArgs()

unsigned int StaticType::getMaxArgs ( ) const
inline

◆ getMin()

unsigned int StaticType::getMin ( ) const
inline

◆ getMinArgs()

unsigned int StaticType::getMinArgs ( ) const
inline

◆ getReturnType()

const StaticType* StaticType::getReturnType ( ) const
inline

◆ isType()

bool StaticType::isType ( const StaticType type) const

◆ matches()

TypeMatch StaticType::matches ( const StaticType actual) const

◆ multiply()

StaticType& StaticType::multiply ( unsigned int  min,
unsigned int  max 
)

◆ operator &()

StaticType StaticType::operator& ( const StaticType st) const

◆ operator &=()

StaticType& StaticType::operator&= ( const StaticType st)

◆ operator=()

StaticType& StaticType::operator= ( const StaticType o)

◆ operator|()

StaticType StaticType::operator| ( const StaticType st) const

◆ operator|=()

StaticType& StaticType::operator|= ( const StaticType st)

◆ setCardinality()

void StaticType::setCardinality ( unsigned int  min,
unsigned int  max 
)

◆ substitute()

StaticType& StaticType::substitute ( const StaticType from,
const StaticType to 
)

◆ typeConcat()

void StaticType::typeConcat ( const StaticType st)

◆ typeExcept()

void StaticType::typeExcept ( const StaticType st)

◆ typeIntersect()

void StaticType::typeIntersect ( const StaticType st)

◆ typeNodeIntersect()

void StaticType::typeNodeIntersect ( const StaticType st)

◆ typeToBuf()

void StaticType::typeToBuf ( xercesc::XMLBuffer &  buf) const

◆ typeUnion()

void StaticType::typeUnion ( const StaticType st)

Member Data Documentation

◆ UNLIMITED

const unsigned int StaticType::UNLIMITED
static

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