/* * Copyright (c) 2001, DecisionSoft Limited All rights reserved. * Please see LICENSE.TXT for more information. */ #ifndef _DATAITEMLITERAL_HPP #define _DATAITEMLITERAL_HPP #include #include #include class Item; class ATDecimalOrDerived; class ATDoubleOrDerived; class ATStringOrDerived; /** defines the behaviour for the literal types*/ class PATHAN_EXPORT DataItemLiteral : public DataItemImpl { public: DataItemLiteral(const ATStringOrDerived* s, XPath2MemoryManager* memMgr); DataItemLiteral(const ATDecimalOrDerived* d, XPath2MemoryManager* memMgr); DataItemLiteral(const ATDoubleOrDerived* d, XPath2MemoryManager* memMgr); ~DataItemLiteral(); /** * Called during static analysis to determine if statically correct. * Performs constant folding. */ virtual DataItem* staticResolution(StaticContext *context, StaticResolutionContext *src); //collapase the compiled expression based on context virtual Sequence collapseTreeInternal(DynamicContext* context, int flags=0) const; private: const Item* _item; }; #endif