SourceForge.net Logo

Node.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2007
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2007
00005  *     Oracle. All rights reserved.
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  *
00019  * $Id: Node.hpp,v 1.15 2007/11/28 13:13:24 jpcs Exp $
00020  */
00021 
00022 #ifndef _XQILLANODE_HPP
00023 #define _XQILLANODE_HPP
00024 
00025 #include <xqilla/items/ATQNameOrDerived.hpp>
00026 #include <xqilla/items/ATBooleanOrDerived.hpp>
00027 #include <xqilla/ast/XQStep.hpp>
00028 
00029 class DynamicContext;
00030 class XPath2MemoryManager;
00031 class Sequence;
00032 class Result;
00033 class NodeTest;
00034 
00035 class XQILLA_API Node : public Item
00036 {
00037 public:
00038   typedef RefCountPointer<const Node> Ptr;
00039 
00041   virtual bool isNode() const = 0;
00042 
00044   virtual bool isAtomicValue() const = 0;
00045 
00047   virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00048 
00050   virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const = 0;
00051   
00054   virtual Sequence dmBaseURI(const DynamicContext* context) const = 0;
00055 
00057   virtual const XMLCh* dmNodeKind() const = 0;
00058 
00060   virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const = 0;
00061 
00063   virtual const XMLCh* dmStringValue(const DynamicContext* context) const = 0;
00064 
00068   virtual Sequence dmTypedValue(DynamicContext* context) const = 0;
00069 
00072   virtual Sequence dmDocumentURI(const DynamicContext* context) const = 0;
00073 
00075   virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const = 0;
00076 
00078   virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const = 0;
00079 
00082   virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00083 
00085   virtual bool equals(const Node::Ptr &other) const = 0;
00086 
00089   virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00090 
00092   virtual Node::Ptr root(const DynamicContext* context) const = 0;
00093 
00095   virtual Node::Ptr dmParent(const DynamicContext* context) const = 0;
00096 
00098   virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const = 0;
00099 
00101   virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const = 0;
00102 
00104   virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const = 0;
00105 
00111   virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const = 0;
00112 
00114   virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const = 0;
00115 
00117   virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const = 0;
00118 
00119   /* Get the namespace URI for the DOM type */
00120   virtual const XMLCh* getTypeURI() const = 0;
00121 
00122   /* Get the name of the DOM type  (ie "integer" for xs:integer) */
00123   virtual const XMLCh* getTypeName() const = 0;
00124 
00126   virtual void generateEvents(EventHandler *events, const DynamicContext *context,
00127                               bool preserveNS = true, bool preserveType = true) const = 0;
00128 
00129   static const XMLCh document_string[];
00130   static const XMLCh element_string[];
00131   static const XMLCh attribute_string[];
00132   static const XMLCh text_string[];
00133   static const XMLCh processing_instruction_string[];
00134   static const XMLCh comment_string[];
00135   static const XMLCh namespace_string[];
00136 };
00137 #endif

Generated on Wed Dec 12 20:16:43 2007 for XQilla Simple API by  doxygen 1.5.1