/* * Copyright (c) 2001, DecisionSoft Limited All rights reserved. * Please see LICENSE.TXT for more information. */ #ifndef _DATAITEMVARIABLE_HPP #define _DATAITEMVARIABLE_HPP #include #include #include /** Deals with all the simple variable stuff.*/ class PATHAN_EXPORT DataItemVariable : public DataItemImpl { public: DataItemVariable(const XMLCh *qualifiedName, XPath2MemoryManager* memMgr); DataItemVariable(const XMLCh *prefix, const XMLCh *name, XPath2MemoryManager* memMgr); ~DataItemVariable(); //collapase the compiled expression based on context virtual Sequence collapseTreeInternal(DynamicContext* context, int flags=0) const; /** * Called during static analysis to determine if statically correct. Checks * if variable has been defined in the appropriate scope. * If not an appropriate error is thrown. */ virtual DataItem* staticResolution(StaticContext *context, StaticResolutionContext *src); const XMLCh *getPrefix() const; const XMLCh *getURI() const; const XMLCh *getName() const; private: const XMLCh* _prefix; const XMLCh* _uri; const XMLCh* _name; }; #endif