00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALANNODE_HEADER_GUARD_1357924680) 00019 #define XALANNODE_HEADER_GUARD_1357924680 00020 00021 00022 00023 #include <xalanc/XalanDOM/XalanDOMDefinitions.hpp> 00024 00025 00026 00027 XALAN_CPP_NAMESPACE_BEGIN 00028 00029 00030 00031 class XalanDOMString; 00032 class XalanDocument; 00033 class XalanNamedNodeMap; 00034 class XalanNodeList; 00035 00036 00037 00038 class XALAN_DOM_EXPORT XalanNode 00039 { 00040 public: 00041 00042 XalanNode(); 00043 00044 virtual 00045 ~XalanNode(); 00046 00047 enum NodeType 00048 { 00049 UNKNOWN_NODE = 0, 00050 ELEMENT_NODE = 1, 00051 ATTRIBUTE_NODE = 2, 00052 TEXT_NODE = 3, 00053 CDATA_SECTION_NODE = 4, 00054 ENTITY_REFERENCE_NODE = 5, 00055 ENTITY_NODE = 6, 00056 PROCESSING_INSTRUCTION_NODE = 7, 00057 COMMENT_NODE = 8, 00058 DOCUMENT_NODE = 9, 00059 DOCUMENT_TYPE_NODE = 10, 00060 DOCUMENT_FRAGMENT_NODE = 11, 00061 NOTATION_NODE = 12 00062 }; 00063 00064 typedef unsigned long IndexType; 00065 00066 /** 00067 * Gets the name of this node, depending on its type. 00068 */ 00069 virtual const XalanDOMString& 00070 getNodeName() const = 0; 00071 00072 /** 00073 * Gets the value of this node, depending on its type. 00074 */ 00075 virtual const XalanDOMString& 00076 getNodeValue() const = 0; 00077 00078 /** 00079 * An enum value representing the type of the underlying object. 00080 */ 00081 virtual NodeType 00082 getNodeType() const = 0; 00083 00084 /** 00085 * Gets the parent of this node. 00086 * 00087 * If there is no such node, this returns a null pointer. 00088 */ 00089 virtual XalanNode* 00090 getParentNode() const = 0; 00091 00092 /** 00093 * Gets a XalanNodeList that contains all children of this node. 00094 * 00095 * If there are no children, this is a XalanNodeList containing no nodes. 00096 */ 00097 virtual const XalanNodeList* 00098 getChildNodes() const = 0; 00099 00100 /** 00101 * Gets the first child of this node. 00102 * 00103 * If there is no such node, this returns a null pointer. 00104 */ 00105 virtual XalanNode* 00106 getFirstChild() const = 0; 00107 00108 /** 00109 * Gets the last child of this node. 00110 * 00111 * If there is no such node, this returns a null pointer. 00112 */ 00113 virtual XalanNode* 00114 getLastChild() const = 0; 00115 00116 /** 00117 * Gets the node immediately preceding this node. 00118 * 00119 * If there is no such node, this returns a null pointer. 00120 */ 00121 virtual XalanNode* 00122 getPreviousSibling() const = 0; 00123 00124 /** 00125 * Gets the node immediately following this node. 00126 * 00127 * If there is no such node, this returns a null pointer. 00128 */ 00129 virtual XalanNode* 00130 getNextSibling() const = 0; 00131 00132 /** 00133 * Gets a XalanNamedNodeMap containing the attributes of this node (if it 00134 * is an XalanElement) or a null pointer otherwise. 00135 */ 00136 virtual const XalanNamedNodeMap* 00137 getAttributes() const = 0; 00138 00139 /** 00140 * Gets the XalanDocument object associated with this node. This may 00141 * be a null pointer. 00142 */ 00143 virtual XalanDocument* 00144 getOwnerDocument() const = 0; 00145 00146 /** 00147 * Get the namespace URI of this node. 00148 */ 00149 virtual const XalanDOMString& 00150 getNamespaceURI() const = 0; 00151 00152 /** 00153 * Get the namespace prefix of this node. 00154 */ 00155 virtual const XalanDOMString& 00156 getPrefix() const = 0; 00157 00158 /** 00159 * Returns the local part of the qualified name of this node. 00160 */ 00161 virtual const XalanDOMString& 00162 getLocalName() const = 0; 00163 00164 /** 00165 * Determine if the document is node-order indexed. 00166 * 00167 * @return true if the document is indexed, otherwise false. 00168 */ 00169 virtual bool 00170 isIndexed() const = 0; 00171 00172 /** 00173 * Get the node's index. Valid only if the owner document 00174 * reports that the document is node-order indexed. 00175 * 00176 * @return The index value, or 0 if the node is not indexed. 00177 */ 00178 virtual IndexType 00179 getIndex() const = 0; 00180 00181 protected: 00182 00183 XalanNode(const XalanNode& theSource); 00184 00185 XalanNode& 00186 operator=(const XalanNode& theSource); 00187 00188 bool 00189 operator==(const XalanNode& theRHS) const; 00190 00191 private: 00192 00193 #if !defined(NDEBUG) 00194 static size_t s_instanceCount; 00195 #endif 00196 }; 00197 00198 00199 00200 XALAN_CPP_NAMESPACE_END 00201 00202 00203 00204 #endif // !defined(XALANNODE_HEADER_GUARD_1357924680)
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|