SourceForge.net Logo

Node.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2006
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2006
00005  *     Progress Software Corporation. All rights reserved.
00006  * Copyright (c) 2004-2006
00007  *     Oracle. All rights reserved.
00008  *
00009  * See the file LICENSE for redistribution information.
00010  *
00011  * $Id: Node.hpp,v 1.14 2007/07/10 16:28:58 jpcs Exp $
00012  */
00013 
00014 #ifndef _XQILLANODE_HPP
00015 #define _XQILLANODE_HPP
00016 
00017 #include <xqilla/items/ATQNameOrDerived.hpp>
00018 #include <xqilla/items/ATBooleanOrDerived.hpp>
00019 #include <xqilla/ast/XQStep.hpp>
00020 
00021 class DynamicContext;
00022 class XPath2MemoryManager;
00023 class Sequence;
00024 class Result;
00025 class NodeTest;
00026 
00027 class XQILLA_API Node : public Item
00028 {
00029 public:
00030   typedef RefCountPointer<const Node> Ptr;
00031 
00033   virtual bool isNode() const = 0;
00034 
00036   virtual bool isAtomicValue() const = 0;
00037 
00039   virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00040 
00042   virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const = 0;
00043   
00046   virtual Sequence dmBaseURI(const DynamicContext* context) const = 0;
00047 
00049   virtual const XMLCh* dmNodeKind() const = 0;
00050 
00052   virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const = 0;
00053 
00055   virtual const XMLCh* dmStringValue(const DynamicContext* context) const = 0;
00056 
00060   virtual Sequence dmTypedValue(DynamicContext* context) const = 0;
00061 
00064   virtual Sequence dmDocumentURI(const DynamicContext* context) const = 0;
00065 
00067   virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const = 0;
00068 
00070   virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const = 0;
00071 
00074   virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00075 
00077   virtual bool equals(const Node::Ptr &other) const = 0;
00078 
00081   virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00082 
00084   virtual Node::Ptr root(const DynamicContext* context) const = 0;
00085 
00087   virtual Node::Ptr dmParent(const DynamicContext* context) const = 0;
00088 
00090   virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const = 0;
00091 
00093   virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const = 0;
00094 
00096   virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const = 0;
00097 
00103   virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const = 0;
00104 
00106   virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const = 0;
00107 
00109   virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const = 0;
00110 
00111   /* Get the namespace URI for the DOM type */
00112   virtual const XMLCh* getTypeURI() const = 0;
00113 
00114   /* Get the name of the DOM type  (ie "integer" for xs:integer) */
00115   virtual const XMLCh* getTypeName() const = 0;
00116 
00118   virtual void generateEvents(EventHandler *events, const DynamicContext *context,
00119                               bool preserveNS = true, bool preserveType = true) const = 0;
00120 
00121   static const XMLCh document_string[];
00122   static const XMLCh element_string[];
00123   static const XMLCh attribute_string[];
00124   static const XMLCh text_string[];
00125   static const XMLCh processing_instruction_string[];
00126   static const XMLCh comment_string[];
00127   static const XMLCh namespace_string[];
00128 };
00129 #endif

Generated on Fri Aug 31 14:37:35 2007 for XQilla Simple API by  doxygen 1.5.1