SourceForge.net Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

Node.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2008
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2008
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 547 2008-06-06 14:41:18Z jpcs $
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;
00042 
00044   virtual bool isAtomicValue() const;
00045 
00046   virtual bool isFunction() const;
00047 
00048   virtual void typeToBuffer(DynamicContext *context, XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer &buffer) const;
00049 
00051   virtual const XMLCh* asString(const DynamicContext* context) const = 0;
00052 
00054   virtual bool hasInstanceOfType(const XMLCh* typeURI, const XMLCh* typeName, const DynamicContext* context) const = 0;
00055   
00058   virtual Sequence dmBaseURI(const DynamicContext* context) const = 0;
00059 
00061   virtual const XMLCh* dmNodeKind() const = 0;
00062 
00064   virtual ATQNameOrDerived::Ptr dmNodeName(const DynamicContext* context) const = 0;
00065 
00067   virtual const XMLCh* dmStringValue(const DynamicContext* context) const = 0;
00068 
00072   virtual Sequence dmTypedValue(DynamicContext* context) const = 0;
00073 
00076   virtual Sequence dmDocumentURI(const DynamicContext* context) const = 0;
00077 
00079   virtual ATQNameOrDerived::Ptr dmTypeName(const DynamicContext* context) const = 0;
00080 
00082   virtual ATBooleanOrDerived::Ptr dmNilled(const DynamicContext* context) const = 0;
00083 
00086   virtual bool lessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00087 
00089   virtual bool equals(const Node::Ptr &other) const = 0;
00090 
00093   virtual bool uniqueLessThan(const Node::Ptr &other, const DynamicContext *context) const = 0;
00094 
00096   virtual Node::Ptr root(const DynamicContext* context) const = 0;
00097 
00099   virtual Node::Ptr dmParent(const DynamicContext* context) const = 0;
00100 
00102   virtual Result dmAttributes(const DynamicContext* context, const LocationInfo *info) const = 0;
00103 
00105   virtual Result dmNamespaceNodes(const DynamicContext* context, const LocationInfo *info) const = 0;
00106 
00108   virtual Result dmChildren(const DynamicContext *context, const LocationInfo *info) const = 0;
00109 
00115   virtual Result getAxisResult(XQStep::Axis axis, const NodeTest *nodeTest, const DynamicContext *context, const LocationInfo *info) const = 0;
00116 
00118   virtual ATBooleanOrDerived::Ptr dmIsId(const DynamicContext* context) const = 0;
00119 
00121   virtual ATBooleanOrDerived::Ptr dmIsIdRefs(const DynamicContext* context) const = 0;
00122 
00123   /* Get the namespace URI for the DOM type */
00124   virtual const XMLCh* getTypeURI() const = 0;
00125 
00126   /* Get the name of the DOM type  (ie "integer" for xs:integer) */
00127   virtual const XMLCh* getTypeName() 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 Fri Sep 25 06:55:26 2009 for XQilla Simple API by  doxygen 1.3.9.1